스플래시 06월
This commit is contained in:
@@ -6,6 +6,7 @@ import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.os.bundleOf
|
||||
import com.google.firebase.dynamiclinks.PendingDynamicLinkData
|
||||
@@ -33,18 +34,41 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val lp = binding.ivText.layoutParams as ConstraintLayout.LayoutParams
|
||||
lp.topMargin = screenHeight * 302 / 2337
|
||||
binding.ivText.layoutParams = lp
|
||||
|
||||
val lp2 = binding.ivText2.layoutParams as ConstraintLayout.LayoutParams
|
||||
lp2.bottomMargin = screenHeight * 195 / 2337
|
||||
binding.ivText2.layoutParams = lp2
|
||||
setLayoutParams(binding.ivText, start = 0, end = 0, top = 390, bottom = 0)
|
||||
setLayoutParams(binding.ivTextLogo, start = 0, end = 0, top = 0, bottom = 150)
|
||||
|
||||
setupRemoteConfig()
|
||||
fetchAndroidLatestVersion()
|
||||
}
|
||||
|
||||
private fun setLayoutParams(
|
||||
imageView: ImageView,
|
||||
start: Int = 0,
|
||||
end: Int = 0,
|
||||
top: Int = 0,
|
||||
bottom: Int = 0
|
||||
) {
|
||||
val lp = imageView.layoutParams as ConstraintLayout.LayoutParams
|
||||
|
||||
if (top > 0) {
|
||||
lp.topMargin = screenHeight * top / 2337
|
||||
}
|
||||
|
||||
if (bottom > 0) {
|
||||
lp.bottomMargin = screenHeight * bottom / 2337
|
||||
}
|
||||
|
||||
if (start > 0) {
|
||||
lp.leftMargin = screenWidth * start / 1080
|
||||
}
|
||||
|
||||
if (end > 0) {
|
||||
lp.rightMargin = screenWidth * end / 1080
|
||||
}
|
||||
|
||||
imageView.layoutParams = lp
|
||||
}
|
||||
|
||||
private fun setupRemoteConfig() {
|
||||
val configSettings = remoteConfigSettings {
|
||||
minimumFetchIntervalInSeconds = 300
|
||||
|
||||
Reference in New Issue
Block a user