Theming: add a SplashScreen for TrackListActivity.

This commit is contained in:
Dennis Guse
2020-09-12 00:03:42 +02:00
committed by GitHub
parent 7902aea849
commit 060c4f1529
4 changed files with 26 additions and 2 deletions
+3 -2
View File
@@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="de.dennisguse.opentracks"
android:installLocation="auto">
@@ -138,7 +137,9 @@ limitations under the License.
<activity android:name=".TrackEditActivity" />
<activity android:name=".TrackListActivity">
<activity
android:name=".TrackListActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -214,6 +214,9 @@ public class TrackListActivity extends AbstractListActivity implements ConfirmDe
@Override
protected void onCreate(Bundle savedInstanceState) {
// Reset theme after splash
setTheme(R.style.ThemeCustom);
super.onCreate(savedInstanceState);
gpsStatusValue = GpsStatusValue.GPS_NONE;
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:opacity="opaque">
<!-- TODO DayNight: set background color for dayNight -->
<item android:drawable="@android:color/background_dark" />
<item
android:width="300dp"
android:height="300dp"
android:drawable="@drawable/ic_logo_color_108dp"
android:gravity="center_vertical|center_horizontal"
tools:targetApi="m" />
</layer-list>
+4
View File
@@ -60,4 +60,8 @@ limitations under the License.
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
</style>
<style name="SplashTheme" parent="ThemeCustom">
<item name="android:windowBackground">@drawable/splashscreen</item>
</style>
</resources>