Merge pull request #4038 from osmandapp/splash_screen

Splash screen
This commit is contained in:
Alexey 2017-07-05 18:23:06 +03:00 committed by GitHub
commit 4ca9ccddf6
13 changed files with 119 additions and 3 deletions

View file

@ -6,7 +6,10 @@
android:icon="@mipmap/icon_free" android:icon="@mipmap/icon_free"
android:label="@string/app_name_free" android:label="@string/app_name_free"
tools:replace="android:icon, android:label"> tools:replace="android:icon, android:label">
<activity
android:name="net.osmand.plus.activities.MapActivity"
android:theme="SplashScreenFree"
tools:replace="android:theme"/>
<service <service
android:name="net.osmand.plus.NavigationService" android:name="net.osmand.plus.NavigationService"
tools:replace="android:process" tools:replace="android:process"

View file

@ -5,6 +5,10 @@
<application <application
android:icon="@mipmap/icon_nightly" android:icon="@mipmap/icon_nightly"
tools:replace="android:icon"> tools:replace="android:icon">
<activity
android:name="net.osmand.plus.activities.MapActivity"
android:theme="SplashScreenFreeDev"
tools:replace="android:theme"/>
<service <service
android:name="net.osmand.plus.NavigationService" android:name="net.osmand.plus.NavigationService"
android:process="net.osmand.dev" android:process="net.osmand.dev"

View file

@ -73,7 +73,7 @@
android:resource="@xml/paths" /> android:resource="@xml/paths" />
</provider> </provider>
<activity android:name="net.osmand.plus.activities.MapActivity" android:label="@string/app_name" <activity android:name="net.osmand.plus.activities.MapActivity" android:label="@string/app_name" android:theme="@style/SplashScreenPlus"
android:screenOrientation="unspecified" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize"> android:screenOrientation="unspecified" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/map_background_color_light"/>
<item android:top="24dp">
<bitmap
android:gravity="center_horizontal|top"
android:src="@drawable/ic_logo_splash_osmand"/>
</item>
<item android:bottom="48dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/image_text_osmand"/>
</item>
</layer-list>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/map_background_color_light"/>
<item android:top="24dp">
<bitmap
android:gravity="center_horizontal|top"
android:src="@drawable/ic_logo_splash_osmand"/>
</item>
<item android:bottom="48dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/image_text_osmand"/>
</item>
</layer-list>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/map_background_color_light"/>
<item android:top="24dp">
<bitmap
android:gravity="center_horizontal|top"
android:src="@drawable/ic_logo_splash_osmand_plus"/>
</item>
<item android:bottom="48dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/image_text_osmand_plus"/>
</item>
</layer-list>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/map_background_color_light"/>
<item android:top="150dp">
<bitmap
android:gravity="center_horizontal|top"
android:src="@drawable/ic_logo_splash_osmand"/>
</item>
<item android:bottom="128dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/image_text_osmand"/>
</item>
</layer-list>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/map_background_color_light"/>
<item android:top="150dp">
<bitmap
android:gravity="center_horizontal|top"
android:src="@drawable/ic_logo_splash_osmand"/>
</item>
<item android:bottom="128dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/image_text_osmand"/>
</item>
</layer-list>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/map_background_color_light"/>
<item android:top="150dp">
<bitmap
android:gravity="center_horizontal|top"
android:src="@drawable/ic_logo_splash_osmand_plus"/>
</item>
<item android:bottom="128dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/image_text_osmand_plus"/>
</item>
</layer-list>

View file

@ -3,7 +3,8 @@
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="?attr/mapBackground">
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -4,6 +4,7 @@
<attr name="maxVisibleWidth" format="dimension"/> <attr name="maxVisibleWidth" format="dimension"/>
</declare-styleable> </declare-styleable>
<declare-styleable name="OsmAndTheme"> <declare-styleable name="OsmAndTheme">
<attr name="mapBackground" format="reference"/>
<attr name="routeParameterTitleColor" format="color"/> <attr name="routeParameterTitleColor" format="color"/>
<attr name="chart_marker_background" format="reference" /> <attr name="chart_marker_background" format="reference" />
<!-- list colors --> <!-- list colors -->

View file

@ -254,4 +254,7 @@
<color name="gpx_split_segment_icon_color">#b3b3b3</color> <color name="gpx_split_segment_icon_color">#b3b3b3</color>
<color name="map_background_color_light">#fafafa</color>
<color name="map_background_color_dark">#101821</color>
</resources> </resources>

View file

@ -74,8 +74,21 @@
<item name="android:background">?attr/selectableItemBackground</item> <item name="android:background">?attr/selectableItemBackground</item>
</style> </style>
<style name="SplashScreenPlus" parent="OsmandLightTheme">
<item name="android:windowBackground">@drawable/splash_screen_plus</item>
</style>
<style name="SplashScreenFree" parent="OsmandLightTheme">
<item name="android:windowBackground">@drawable/splash_screen_free</item>
</style>
<style name="SplashScreenFreeDev" parent="OsmandLightTheme">
<item name="android:windowBackground">@drawable/splash_screen_free_dev</item>
</style>
<!-- Osmand themes styles --> <!-- Osmand themes styles -->
<style name="OsmandLightTheme" parent="Theme.AppCompat.Light"> <style name="OsmandLightTheme" parent="Theme.AppCompat.Light">
<item name="mapBackground">@color/map_background_color_light</item>
<item name="chart_marker_background">@drawable/chart_marker_background_light</item> <item name="chart_marker_background">@drawable/chart_marker_background_light</item>
<item name="routeParameterTitleColor">@color/color_myloc_distance</item> <item name="routeParameterTitleColor">@color/color_myloc_distance</item>
<item name="ctx_menu_info_divider">@color/ctx_menu_info_divider_light</item> <item name="ctx_menu_info_divider">@color/ctx_menu_info_divider_light</item>
@ -249,6 +262,7 @@
</style> </style>
<style name="OsmandDarkTheme" parent="Theme.AppCompat"> <style name="OsmandDarkTheme" parent="Theme.AppCompat">
<item name="mapBackground">@color/map_background_color_dark</item>
<item name="chart_marker_background">@drawable/chart_marker_background_dark</item> <item name="chart_marker_background">@drawable/chart_marker_background_dark</item>
<item name="routeParameterTitleColor">@color/osmand_orange</item> <item name="routeParameterTitleColor">@color/osmand_orange</item>
<item name="ctx_menu_info_divider">@color/ctx_menu_info_divider_dark</item> <item name="ctx_menu_info_divider">@color/ctx_menu_info_divider_dark</item>