-
Notifications
You must be signed in to change notification settings - Fork 2
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
[UI/#35] splash screen 구현 #38
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.
조하요 ~ 앱 업데이트 부분들만 다 수정해주세요
object GooglePlayDependencies { | ||
const val update = "com.google.android.play:app-update:${Versions.googlePlayUpdate}" | ||
const val updateKtx = "com.google.android.play:app-update-ktx:${Versions.googlePlayUpdate}" | ||
} |
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.
허헣 삭제했습니다~
buildSrc/src/main/kotlin/Versions.kt
Outdated
@@ -41,6 +41,7 @@ object Versions { | |||
const val junitVersion = "4.13.2" | |||
const val espressoVersion = "3.3.0" | |||
const val androidTestVersion = "1.1.2" | |||
const val googlePlayUpdate = "2.1.0" |
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.
얘도~
import android.net.ConnectivityManager | ||
import android.net.NetworkCapabilities | ||
|
||
object NetworkManager { |
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.
음~ 최고
import timber.log.Timber | ||
|
||
class SplashActivity : BaseActivity<ActivitySplashBinding>(R.layout.activity_splash) { | ||
private val appUpdateManager by lazy { AppUpdateManagerFactory.create(this) } |
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.
지웠읍니다...
isConnectedNetwork() | ||
} | ||
|
||
private fun isConnectedNetwork() { |
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.
변수 이름으로는 is가 적합하지만, 함수명으로는 check가 더 어울릴 것 같습니당
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.
변경 완~
finish() | ||
} | ||
|
||
private fun requestUpdate(appUpdateInfo: AppUpdateInfo) { |
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.
넹~
<string name="notice">안내</string> | ||
<string name="okay">확인</string> | ||
<string name="internet_connect_error">인터넷 연결을 확인해주세요</string> | ||
<string name="splash_update_error">업데이트에 문제가 생겼어요\n다시 시도해주세요</string> |
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.
나머지는 network 연결 에러시 dialog에도 사용되기 때문에 마지막만 지우도록 하겠습니다~
<style name="splash_delete" parent="Base.Theme.Doorip"> | ||
<item name="android:windowIsTranslucent">true</item> | ||
</style> |
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.
기존에 존재하는 splashScreen을 제거하는 기능을 합니다!!
이게 없으면 splash가 두개가 떠용
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 navigateToSignInScreen() { | ||
Intent(this, SignInActivity::class.java).apply { | ||
startActivity(this) | ||
} | ||
finish() |
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.
스코프 함수 좋습니다!
.build(), | ||
) | ||
}.onFailure { | ||
Timber.e(it) |
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.
스플래쉬에 동작 방식에 대해서 알아간 것 같네용 최고!
.setPositiveButton( | ||
R.string.okay, | ||
) { _, _ -> | ||
finishAffinity() |
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.
불필요한 아이들은 이렇게 처리할 수도 있군요!
Handler(Looper.getMainLooper()).postDelayed({ | ||
navigateToSignInScreen() | ||
if (false) { // 자동 로그인 판정으로 변경 예정 | ||
navigateToMainScreen() | ||
} else { | ||
navigateToSignInScreen() | ||
} | ||
}, 3000) |
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
📸 Screenshot
2024-01-08.7.13.01.mov
📢 To Reviewers