스플래시 2024/09
This commit is contained in:
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2024-08-23T14:56:05.594981Z">
|
||||
<DropdownSelection timestamp="2024-08-26T10:43:24.248064Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=2cec640c34017ece" />
|
||||
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/klaus/.android/avd/Pixel_8_Pro_API_34.avd" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
@@ -35,8 +35,8 @@ android {
|
||||
applicationId "kr.co.vividnext.sodalive"
|
||||
minSdk 23
|
||||
targetSdk 34
|
||||
versionCode 98
|
||||
versionName "1.15.3"
|
||||
versionCode 99
|
||||
versionName "1.16.0"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@@ -29,46 +29,19 @@ import kr.co.vividnext.sodalive.onboarding.OnBoardingActivity
|
||||
import kr.co.vividnext.sodalive.user.login.LoginActivity
|
||||
|
||||
@SuppressLint("CustomSplashScreen")
|
||||
class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding::inflate),
|
||||
SurfaceHolder.Callback2 {
|
||||
class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding::inflate) {
|
||||
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
private val remoteConfig = Firebase.remoteConfig
|
||||
|
||||
private var mediaPlayer: MediaPlayer? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setLayoutParams(binding.ivTitle, start = 0, end = 0, top = 180, bottom = 0)
|
||||
setLayoutParams(binding.ivText, start = 0, end = 0, top = 0, bottom = 107)
|
||||
|
||||
setupRemoteConfig()
|
||||
binding.surfaceView.holder.addCallback(this)
|
||||
}
|
||||
|
||||
override fun surfaceCreated(holder: SurfaceHolder) {
|
||||
val uri = Uri.parse("android.resource://$packageName/${R.raw.video}")
|
||||
mediaPlayer = MediaPlayer().apply {
|
||||
setDataSource(this@SplashActivity, uri)
|
||||
setDisplay(holder)
|
||||
setOnPreparedListener {
|
||||
start()
|
||||
handler.postDelayed({
|
||||
binding.surfaceView.background = null
|
||||
}, 100)
|
||||
}
|
||||
setOnCompletionListener { fetchAndroidLatestVersion() }
|
||||
prepareAsync()
|
||||
}
|
||||
}
|
||||
|
||||
override fun surfaceChanged(p0: SurfaceHolder, p1: Int, p2: Int, p3: Int) {
|
||||
}
|
||||
|
||||
override fun surfaceDestroyed(p0: SurfaceHolder) {
|
||||
mediaPlayer?.release()
|
||||
mediaPlayer = null
|
||||
}
|
||||
|
||||
override fun surfaceRedrawNeeded(p0: SurfaceHolder) {
|
||||
fetchAndroidLatestVersion()
|
||||
}
|
||||
|
||||
private fun setLayoutParams(
|
||||
@@ -256,7 +229,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
|
||||
}
|
||||
)
|
||||
finish()
|
||||
}, 500)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
private fun showMainActivity(extras: Bundle?) {
|
||||
@@ -269,7 +242,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
|
||||
}
|
||||
)
|
||||
finish()
|
||||
}, 500)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
private fun showLoginActivity(extras: Bundle?) {
|
||||
@@ -282,7 +255,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
|
||||
}
|
||||
)
|
||||
finish()
|
||||
}, 500)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
override fun setupView() {}
|
||||
|
BIN
app/src/main/res/drawable-xxhdpi/splash_bg.jpg
Normal file
BIN
app/src/main/res/drawable-xxhdpi/splash_bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 MiB |
BIN
app/src/main/res/drawable-xxhdpi/splash_text.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/splash_text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable-xxhdpi/splash_title.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/splash_title.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@@ -1,12 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gradient_splash">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<SurfaceView
|
||||
android:id="@+id/surface_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gradient_splash" />
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/splash_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/splash_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/splash_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user