fixed splash screen issue
This commit is contained in:
parent
6d3d5d0736
commit
b81b4fecf0
|
@ -11,8 +11,7 @@
|
|||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/LightTheme.Blue">
|
||||
android:supportsRtl="true">
|
||||
<activity
|
||||
android:name=".ui.core.SplashScreenActivity"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -3,11 +3,13 @@ package com.vanced.manager.ui.core
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.ui.MainActivity
|
||||
|
||||
class SplashScreenActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
setTheme(R.style.SplashTheme)
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
startActivity(Intent(this@SplashScreenActivity, MainActivity::class.java))
|
||||
|
|
|
@ -4,8 +4,6 @@ import android.annotation.SuppressLint
|
|||
import android.app.ActivityManager
|
||||
import android.content.SharedPreferences
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
|
@ -22,10 +20,11 @@ open class ThemeActivity : AppCompatActivity() {
|
|||
currentTheme = pref.getString("theme_mode", "").toString()
|
||||
|
||||
setFinalTheme(currentTheme)
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < 28) {
|
||||
setTaskBG()
|
||||
}
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -49,10 +48,9 @@ open class ThemeActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
private fun setTaskBG() {
|
||||
val icon = BitmapFactory.decodeResource(resources, R.drawable.splash192)
|
||||
val label = getString(R.string.app_name)
|
||||
val color = ResourcesCompat.getColor(resources, R.color.Black, null)
|
||||
val taskDec: ActivityManager.TaskDescription = ActivityManager.TaskDescription(label, icon, color)
|
||||
val taskDec: ActivityManager.TaskDescription = ActivityManager.TaskDescription(label, null, color)
|
||||
setTaskDescription(taskDec)
|
||||
}
|
||||
}
|
|
@ -13,6 +13,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/home_appbar"
|
||||
android:layout_above="@id/bottom_nav"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/mobile_navigation"/>
|
||||
|
||||
|
@ -45,12 +46,4 @@
|
|||
app:labelVisibilityMode="unlabeled"
|
||||
app:menu="@menu/bottom_nav_menu" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/bottom_nav"
|
||||
android:layout_below="@id/home_appbar">
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -56,7 +56,7 @@
|
|||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="- Laura Almeida (woman)"
|
||||
android:text="- Laura Almeida (waman)"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in New Issue