Styling
This commit is contained in:
parent
68e85bbbf3
commit
240bcd8f01
8 changed files with 204 additions and 84 deletions
54
OsmAnd/res/layout-land/empty_state_favourites.xml
Normal file
54
OsmAnd/res/layout-land/empty_state_favourites.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@android:id/empty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/empty_state_image_view"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
tools:src="@drawable/ic_empty_state_favorites_night_result"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/my_places_empty_state_text_interval"
|
||||||
|
android:background="@null"
|
||||||
|
android:text="@string/empty_state_favourites"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_size"
|
||||||
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:layout_marginRight="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/empty_state_favourites_desc"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_desc_size"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/import_button"
|
||||||
|
style="@style/DialogActionButton"
|
||||||
|
android:layout_marginTop="@dimen/my_places_empty_state_button_margin_top"
|
||||||
|
android:text="@string/shared_string_import"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
54
OsmAnd/res/layout-land/empty_state_my_tracks.xml
Normal file
54
OsmAnd/res/layout-land/empty_state_my_tracks.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@android:id/empty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/empty_state_image_view"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
tools:src="@drawable/ic_empty_state_trip_night_result"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/my_places_empty_state_text_interval"
|
||||||
|
android:background="@null"
|
||||||
|
android:text="@string/empty_state_my_tracks"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_size"
|
||||||
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:layout_marginRight="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/empty_state_my_tracks_desc"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_desc_size"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/import_button"
|
||||||
|
style="@style/DialogActionButton"
|
||||||
|
android:layout_marginTop="@dimen/my_places_empty_state_button_margin_top"
|
||||||
|
android:text="@string/shared_string_import"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -2,8 +2,6 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout 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"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:background="?attr/ctx_menu_info_view_bg"
|
android:background="?attr/ctx_menu_info_view_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -20,45 +18,6 @@
|
||||||
android:drawSelectorOnTop="false"
|
android:drawSelectorOnTop="false"
|
||||||
android:groupIndicator="@android:color/transparent"/>
|
android:groupIndicator="@android:color/transparent"/>
|
||||||
|
|
||||||
<LinearLayout
|
<include layout="@layout/empty_state_my_tracks"/>
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:id="@android:id/empty"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_marginTop="@dimen/my_places_empty_state_image_margin_top"
|
|
||||||
android:layout_marginBottom="@dimen/my_places_empty_state_image_margin_bottom"
|
|
||||||
android:id="@+id/empty_state_image_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:src="@drawable/ic_empty_state_trip_night_result"/>
|
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
|
||||||
android:layout_marginBottom="@dimen/my_places_empty_state_text_interval"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:text="@string/empty_state_my_tracks"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
osmand:typeface="@string/font_roboto_medium"
|
|
||||||
android:textSize="@dimen/my_places_empty_state_text_size"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:text="@string/empty_state_my_tracks_desc"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="@dimen/my_places_empty_state_text_desc_size"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_marginTop="@dimen/my_places_empty_state_button_margin_top"
|
|
||||||
android:id="@+id/import_button"
|
|
||||||
style="@style/DialogActionButton"
|
|
||||||
android:text="@string/shared_string_import"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
46
OsmAnd/res/layout/empty_state_favourites.xml
Normal file
46
OsmAnd/res/layout/empty_state_favourites.xml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@android:id/empty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/empty_state_image_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/my_places_empty_state_image_margin_bottom"
|
||||||
|
android:layout_marginTop="@dimen/my_places_empty_state_image_margin_top"
|
||||||
|
tools:src="@drawable/ic_empty_state_favorites_night_result"/>
|
||||||
|
|
||||||
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
|
osmand:typeface="@string/font_roboto_medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/my_places_empty_state_text_interval"
|
||||||
|
android:background="@null"
|
||||||
|
android:text="@string/empty_state_favourites"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_size"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_marginLeft="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:layout_marginRight="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:text="@string/empty_state_favourites_desc"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_desc_size"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/import_button"
|
||||||
|
style="@style/DialogActionButton"
|
||||||
|
android:layout_marginTop="@dimen/my_places_empty_state_button_margin_top"
|
||||||
|
android:text="@string/shared_string_import"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
46
OsmAnd/res/layout/empty_state_my_tracks.xml
Normal file
46
OsmAnd/res/layout/empty_state_my_tracks.xml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@android:id/empty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/empty_state_image_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/my_places_empty_state_image_margin_bottom"
|
||||||
|
android:layout_marginTop="@dimen/my_places_empty_state_image_margin_top"
|
||||||
|
tools:src="@drawable/ic_empty_state_trip_night_result"/>
|
||||||
|
|
||||||
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/my_places_empty_state_text_interval"
|
||||||
|
android:background="@null"
|
||||||
|
android:text="@string/empty_state_my_tracks"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_size"
|
||||||
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_marginLeft="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:layout_marginRight="@dimen/empty_state_text_desc_margin"
|
||||||
|
android:text="@string/empty_state_my_tracks_desc"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="@dimen/my_places_empty_state_text_desc_size"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/import_button"
|
||||||
|
style="@style/DialogActionButton"
|
||||||
|
android:layout_marginTop="@dimen/my_places_empty_state_button_margin_top"
|
||||||
|
android:text="@string/shared_string_import"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -1,7 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/MainLayout"
|
android:id="@+id/MainLayout"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
|
@ -21,45 +19,6 @@
|
||||||
android:drawSelectorOnTop="false"
|
android:drawSelectorOnTop="false"
|
||||||
android:groupIndicator="@android:color/transparent"/>
|
android:groupIndicator="@android:color/transparent"/>
|
||||||
|
|
||||||
<LinearLayout
|
<include layout="@layout/empty_state_favourites"/>
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:id="@android:id/empty"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_marginTop="@dimen/my_places_empty_state_image_margin_top"
|
|
||||||
android:layout_marginBottom="@dimen/my_places_empty_state_image_margin_bottom"
|
|
||||||
android:id="@+id/empty_state_image_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:src="@drawable/ic_empty_state_favorites_night_result"/>
|
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
|
||||||
android:layout_marginBottom="@dimen/my_places_empty_state_text_interval"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:text="@string/empty_state_favourites"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
osmand:typeface="@string/font_roboto_medium"
|
|
||||||
android:textSize="@dimen/my_places_empty_state_text_size"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:text="@string/empty_state_favourites_desc"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="@dimen/my_places_empty_state_text_desc_size"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_marginTop="@dimen/my_places_empty_state_button_margin_top"
|
|
||||||
android:id="@+id/import_button"
|
|
||||||
style="@style/DialogActionButton"
|
|
||||||
android:text="@string/shared_string_import"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -85,5 +85,6 @@
|
||||||
<dimen name="my_places_empty_state_button_margin_top">30dp</dimen>
|
<dimen name="my_places_empty_state_button_margin_top">30dp</dimen>
|
||||||
<dimen name="my_places_empty_state_text_size">20sp</dimen>
|
<dimen name="my_places_empty_state_text_size">20sp</dimen>
|
||||||
<dimen name="my_places_empty_state_text_desc_size">18sp</dimen>
|
<dimen name="my_places_empty_state_text_desc_size">18sp</dimen>
|
||||||
|
<dimen name="empty_state_text_desc_margin">68dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -150,4 +150,5 @@
|
||||||
<dimen name="my_places_empty_state_button_margin_top">20dp</dimen>
|
<dimen name="my_places_empty_state_button_margin_top">20dp</dimen>
|
||||||
<dimen name="my_places_empty_state_text_size">18sp</dimen>
|
<dimen name="my_places_empty_state_text_size">18sp</dimen>
|
||||||
<dimen name="my_places_empty_state_text_desc_size">16sp</dimen>
|
<dimen name="my_places_empty_state_text_desc_size">16sp</dimen>
|
||||||
|
<dimen name="empty_state_text_desc_margin">45dp</dimen>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in a new issue