Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#27 [feat] 스플래쉬 구현 #29

Merged
merged 11 commits into from
Jan 11, 2024
Merged

Conversation

emjayMJkim
Copy link
Member

@emjayMJkim emjayMJkim commented Jan 10, 2024

📑 Work Description

  • 랜덤 스플래쉬 구현

🛠️ Issue

📷 Screenshot

feat.splash.login.mp4

💬 To Reviewers

일단 로그인 뷰 생성해서 카카오 로그인 버튼 클릭시 StoryTellingActivity로 넘어가도록 했습니다

@emjayMJkim emjayMJkim self-assigned this Jan 10, 2024
@emjayMJkim emjayMJkim added Pull Request pr 날림! Feat 새로운 기능 추가 민정🦊 민정이가 작업함! labels Jan 10, 2024
@emjayMJkim emjayMJkim marked this pull request as draft January 10, 2024 17:41
Copy link

@gaeun5744 gaeun5744 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr 영상을 보면, 앱 로고가 짧게 뜬 후 splashActivity가 나타나네요..!!
아마 구현하신 의도가, 안드로이드 12 이상부터 권장되는 스플래시 뷰 대신, 우회해서 따로 스플래시 뷰를 구현하신거 같은데, 그럴려면 기존 default 스플래시 뷰를 없애야 합니다!!

<item name="android:windowIsTranslucent">true</item>

theme에 이거 적용하면 배민 스플래시 뷰처럼 default 로고 없이 바로 뜰거에요!!

Comment on lines 22 to 24
val versionList: List<Int> = listOf(1, 2, 3, 4)

when (versionList.random()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val versionList: List<Int> = listOf(1, 2, 3, 4)
when (versionList.random()) {
when (Random.nextInt(1, 5)) {

코드 일케 줄일수 있을거 같네요 ㅎㅎ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다!! 더 간결해졌네용

Comment on lines 32 to 41
private fun initMakeFragment(fragmentVersion: Fragment) {
val currentFragment = supportFragmentManager.findFragmentById(R.id.fcv_splash)
if (currentFragment == null) {
supportFragmentManager.beginTransaction()
.add(R.id.fcv_splash, fragmentVersion)
.commit()
}

initMakeSplash()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으로 fragment 보다는,BindingActivity 대신 AppCompatActivity() 를 상속받은 후 랜덤으로 setContentView를 설정해서 구현하는걸 추천드려요!!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네엡!!

Copy link
Member

@minemi00 minemi00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4배로 귀엽다 수고하셨습니다!

import com.sopetit.softie.databinding.FragmentSplashVersionThirdBinding
import com.sopetit.softie.util.binding.BindingFragment

class SplashVersionThirdFragment :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스플래시 프래그먼트를 다 따로 만들어서 해주면 되는군요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 이미지로 바꾸기로 했습니당.. ㅎㅎ 코드 수정할께요!

@emjayMJkim emjayMJkim marked this pull request as ready for review January 11, 2024 09:50
Copy link
Collaborator

@pump9918 pump9918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앱의 얼굴이 완성되었다

initCreateRandomVersion()
}

private fun initCreateRandomVersion() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스플래쉬 랜덤 로직 결국 해냈네요! 멋져요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋ 생각보다 안 어렵더라구요 ㅎㅎ

}, SPLASH_DELAY)
}

companion object {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delay 값을 수기로 넣는 것보다 빼놓는 것이 좋은가요?

Copy link
Member Author

@emjayMJkim emjayMJkim Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일단 매직 넘버를 그냥 써 주는 것보다 companion object 내에 상수로 선언하게 되면 각 값들이 어떤 것을 의미하는 지 파악하기 쉬워집니당

Copy link
Contributor

@stellar-halo stellar-halo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 애들 넘넘 귀엽다..

Comment on lines +23 to +26
1 -> makeSplashImg(R.drawable.ic_splash1)
2 -> makeSplashImg(R.drawable.ic_splash2)
3 -> makeSplashImg(R.drawable.ic_splash3)
4 -> makeSplashImg(R.drawable.ic_splash4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

훨씬 리소스가 간단한 것 같아 좋은 것 같습니다!

@emjayMJkim emjayMJkim merged commit 32356af into develop Jan 11, 2024
1 check passed
@emjayMJkim emjayMJkim deleted the feature/#27-splash-random branch January 11, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 추가 Pull Request pr 날림! 민정🦊 민정이가 작업함!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[ui] 랜덤 스플래쉬
5 participants