-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
There was a problem hiding this 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 로고 없이 바로 뜰거에요!!
val versionList: List<Int> = listOf(1, 2, 3, 4) | ||
|
||
when (versionList.random()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val versionList: List<Int> = listOf(1, 2, 3, 4) | |
when (versionList.random()) { | |
when (Random.nextInt(1, 5)) { |
코드 일케 줄일수 있을거 같네요 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다!! 더 간결해졌네용
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() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
개인적으로 fragment 보다는,BindingActivity 대신 AppCompatActivity() 를 상속받은 후 랜덤으로 setContentView를 설정해서 구현하는걸 추천드려요!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네엡!!
There was a problem hiding this 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 : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스플래시 프래그먼트를 다 따로 만들어서 해주면 되는군요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 이미지로 바꾸기로 했습니당.. ㅎㅎ 코드 수정할께요!
There was a problem hiding this 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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스플래쉬 랜덤 로직 결국 해냈네요! 멋져요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋ 생각보다 안 어렵더라구요 ㅎㅎ
}, SPLASH_DELAY) | ||
} | ||
|
||
companion object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delay 값을 수기로 넣는 것보다 빼놓는 것이 좋은가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일단 매직 넘버를 그냥 써 주는 것보다 companion object 내에 상수로 선언하게 되면 각 값들이 어떤 것을 의미하는 지 파악하기 쉬워집니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 애들 넘넘 귀엽다..
1 -> makeSplashImg(R.drawable.ic_splash1) | ||
2 -> makeSplashImg(R.drawable.ic_splash2) | ||
3 -> makeSplashImg(R.drawable.ic_splash3) | ||
4 -> makeSplashImg(R.drawable.ic_splash4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
훨씬 리소스가 간단한 것 같아 좋은 것 같습니다!
📑 Work Description
🛠️ Issue
📷 Screenshot
feat.splash.login.mp4
💬 To Reviewers
일단 로그인 뷰 생성해서 카카오 로그인 버튼 클릭시
StoryTellingActivity
로 넘어가도록 했습니다