Updated on 2026-08-14
This commit is contained in:
parent
e1bb22534d
commit
bd217bf4a5
8 changed files with 42 additions and 4 deletions
|
|
@ -42,6 +42,7 @@ dependencies {
|
|||
|
||||
/** AndroidX libraries */
|
||||
implementation(deps.androidx.core.ktx)
|
||||
implementation(deps.androidx.core.splashScreen)
|
||||
implementation(deps.androidx.appCompat)
|
||||
implementation(deps.androidx.fragment.ktx)
|
||||
implementation(deps.androidx.constraintLayout)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</queries>
|
||||
|
||||
<application
|
||||
android:theme="@style/AppTheme"
|
||||
android:theme="@style/SplashTheme"
|
||||
android:label="@string/tangem_app_name"
|
||||
android:name="com.tangem.tap.TapApplication"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import android.content.pm.ActivityInfo
|
|||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
import by.kirich1409.viewbindingdelegate.viewBinding
|
||||
|
|
@ -97,6 +98,8 @@ class MainActivity : AppCompatActivity(), SnackbarHandler, ActivityResultCallbac
|
|||
private val onActivityResultCallbacks = mutableListOf<OnActivityResultCallback>()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
installSplashScreen()
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
systemActions()
|
||||
|
|
|
|||
10
app/src/main/res/drawable/inset_splash.xml
Normal file
10
app/src/main/res/drawable/inset_splash.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/splash_logo"
|
||||
android:insetLeft="48dp"
|
||||
android:insetRight="48dp"
|
||||
android:insetTop="48dp"
|
||||
android:insetBottom="48dp"/>
|
||||
|
||||
<!-- image should fit exactly in square 192x192 dp-->
|
||||
<!-- (192 - splash_logo_side)/2 = 48dp -->
|
||||
15
app/src/main/res/drawable/splash_logo.xml
Normal file
15
app/src/main/res/drawable/splash_logo.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="96dp"
|
||||
android:height="96dp"
|
||||
android:viewportWidth="96"
|
||||
android:viewportHeight="96">
|
||||
<path
|
||||
android:pathData="M56.271,47.274V78H69.557C70.073,78 70.567,77.795 70.931,77.431C71.295,77.066 71.5,76.572 71.5,76.056V47.274H56.271Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M25.5,76.056C25.5,76.572 25.705,77.066 26.069,77.431C26.433,77.795 26.927,78 27.443,78H40.729V47.274H25.5V76.056Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M71.5,32.204V18.94C71.5,18.425 71.294,17.932 70.928,17.568C70.562,17.204 70.065,17 69.547,17H27.453C26.935,17 26.438,17.204 26.072,17.568C25.706,17.932 25.5,18.425 25.5,18.94V32.204H71.5Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
|
|
@ -33,7 +33,6 @@
|
|||
<color name="backgroundGray">#F2F2F2</color>
|
||||
<color name="chipBlack">#090E13</color>
|
||||
|
||||
|
||||
<color name="separatorGrey2">#14212121</color>
|
||||
|
||||
<color name="blue">@color/colorSecondary</color>
|
||||
|
|
@ -74,5 +73,7 @@
|
|||
<color name="text_secondary">#656565</color>
|
||||
<color name="text_tertiary">#919191</color>
|
||||
|
||||
<color name="background_splash">#000000</color>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
@ -12,6 +12,12 @@
|
|||
|
||||
<style name="AppTheme" parent="BaseAppTheme" />
|
||||
|
||||
<style name="SplashTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/background_splash</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/inset_splash</item>
|
||||
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||
</style>
|
||||
|
||||
<!-- Toolbar -->
|
||||
|
||||
<!-- Toolbar - overrides the menu text color to use a selector that responds to whether it's enabled or not -->
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ androidxActivityCompose = "1.5.0"
|
|||
androidxAppCompat = "1.5.1"
|
||||
androidxBrowser = "1.4.0"
|
||||
androidxConstraintLayout = "2.1.4"
|
||||
androidxCore = "1.9.0"
|
||||
androidxKtx = "1.9.0"
|
||||
androidxSplashScreen = "1.0.1"
|
||||
androidxFragment = "1.5.3"
|
||||
androidxLifecycle = "2.5.1"
|
||||
androidx-paging = "3.1.1"
|
||||
|
|
@ -119,7 +120,8 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver
|
|||
androidx-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppCompat" }
|
||||
androidx-browser = { module = "androidx.browser:browser", version.ref = "androidxBrowser" }
|
||||
androidx-constraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidxConstraintLayout" }
|
||||
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxCore" }
|
||||
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxKtx" }
|
||||
androidx-core-splashScreen = { module = "androidx.core:core-splashscreen", version.ref = "androidxSplashScreen" }
|
||||
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidxFragment" }
|
||||
androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "androidx-paging" }
|
||||
lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidxLifecycle" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue