1
0
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:
Florian Bouillon 2022-07-19 17:39:15 +02:00
parent 9808670944
commit 888be8d068
6 changed files with 25 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -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"

View File

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View 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>

View File

@ -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>