스플래시 2024/09

This commit is contained in:
klaus 2024-08-26 23:14:31 +09:00
parent 38864ca666
commit 63e9b705a9
8 changed files with 47 additions and 48 deletions

View File

@ -4,10 +4,10 @@
<selectionStates> <selectionStates>
<SelectionState runConfigName="app"> <SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" /> <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"> <Target type="DEFAULT_BOOT">
<handle> <handle>
<DeviceId pluginId="PhysicalDevice" identifier="serial=2cec640c34017ece" /> <DeviceId pluginId="LocalEmulator" identifier="path=/Users/klaus/.android/avd/Pixel_8_Pro_API_34.avd" />
</handle> </handle>
</Target> </Target>
</DropdownSelection> </DropdownSelection>

View File

@ -35,8 +35,8 @@ android {
applicationId "kr.co.vividnext.sodalive" applicationId "kr.co.vividnext.sodalive"
minSdk 23 minSdk 23
targetSdk 34 targetSdk 34
versionCode 98 versionCode 99
versionName "1.15.3" versionName "1.16.0"
} }
buildTypes { buildTypes {

View File

@ -29,46 +29,19 @@ import kr.co.vividnext.sodalive.onboarding.OnBoardingActivity
import kr.co.vividnext.sodalive.user.login.LoginActivity import kr.co.vividnext.sodalive.user.login.LoginActivity
@SuppressLint("CustomSplashScreen") @SuppressLint("CustomSplashScreen")
class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding::inflate), class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding::inflate) {
SurfaceHolder.Callback2 {
private val handler = Handler(Looper.getMainLooper()) private val handler = Handler(Looper.getMainLooper())
private val remoteConfig = Firebase.remoteConfig private val remoteConfig = Firebase.remoteConfig
private var mediaPlayer: MediaPlayer? = null
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) 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() setupRemoteConfig()
binding.surfaceView.holder.addCallback(this) fetchAndroidLatestVersion()
}
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) {
} }
private fun setLayoutParams( private fun setLayoutParams(
@ -256,7 +229,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
} }
) )
finish() finish()
}, 500) }, 1000)
} }
private fun showMainActivity(extras: Bundle?) { private fun showMainActivity(extras: Bundle?) {
@ -269,7 +242,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
} }
) )
finish() finish()
}, 500) }, 1000)
} }
private fun showLoginActivity(extras: Bundle?) { private fun showLoginActivity(extras: Bundle?) {
@ -282,7 +255,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
} }
) )
finish() finish()
}, 500) }, 1000)
} }
override fun setupView() {} override fun setupView() {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,12 +1,38 @@
<?xml version="1.0" encoding="utf-8"?> <?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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:background="@drawable/gradient_splash">
<SurfaceView <ImageView
android:id="@+id/surface_view" android:layout_width="0dp"
android:layout_width="match_parent" android:layout_height="0dp"
android:layout_height="match_parent" android:contentDescription="@null"
android:background="@drawable/gradient_splash" /> android:scaleType="centerCrop"
</RelativeLayout> 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.