mirror of
https://github.com/dzeiocom/OpenHealth.git
synced 2025-04-22 19:02:16 +00:00
feat: Add splash screen
This commit is contained in:
parent
9808670944
commit
888be8d068
BIN
app/src/debug/res/drawable/logo_300.png
Normal file
BIN
app/src/debug/res/drawable/logo_300.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@ -36,7 +36,7 @@
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.OpenHealth.NoActionBar">
|
||||
android:theme="@style/Theme.OpenHealth.SplashScreen">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@ -46,7 +46,8 @@
|
||||
|
||||
<!-- Activity for error handling -->
|
||||
<activity android:name=".ui.ErrorActivity"
|
||||
android:exported="false" />
|
||||
android:theme="@style/Theme.OpenHealth.NoActionBar"
|
||||
android:exported="false" />
|
||||
|
||||
<service
|
||||
android:name=".services.OpenHealthService"
|
||||
|
@ -41,6 +41,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
override val bindingInflater: (LayoutInflater) -> ActivityMainBinding =
|
||||
ActivityMainBinding::inflate
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
setTheme(R.style.Theme_OpenHealth_NoActionBar)
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
}
|
||||
|
||||
override fun onCreated(savedInstanceState: Bundle?) {
|
||||
super.onCreated(savedInstanceState)
|
||||
|
||||
|
BIN
app/src/main/res/drawable/logo_300.png
Normal file
BIN
app/src/main/res/drawable/logo_300.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
12
app/src/main/res/drawable/splash_screen.xml
Normal file
12
app/src/main/res/drawable/splash_screen.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
|
||||
<!-- <item android:drawable="?colorPrimary" />-->
|
||||
<item
|
||||
android:width="133dp"
|
||||
android:gravity="center">
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/logo_300" />
|
||||
</item>
|
||||
</layer-list>
|
@ -12,4 +12,8 @@
|
||||
<item name="cornerSize">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.OpenHealth.SplashScreen" parent="Theme.OpenHealth.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user