Travel update/download card layout in progress
This commit is contained in:
parent
82ca6ac055
commit
830d809e74
9 changed files with 212 additions and 0 deletions
14
OsmAnd/res/drawable/travel_card_download_icon.xml
Normal file
14
OsmAnd/res/drawable/travel_card_download_icon.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/color_osm_edit_create"/>
|
||||
<size
|
||||
android:width="32dp"
|
||||
android:height="32dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:drawable="@drawable/ic_action_import"
|
||||
android:gravity="center"/>
|
||||
</layer-list>
|
12
OsmAnd/res/drawable/travel_card_stroke_bg.xml
Normal file
12
OsmAnd/res/drawable/travel_card_stroke_bg.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?attr/wikivoyage_card_divider_color"/>
|
||||
|
||||
<corners android:radius="3dp"/>
|
||||
|
||||
</shape>
|
14
OsmAnd/res/drawable/travel_card_update_icon.xml
Normal file
14
OsmAnd/res/drawable/travel_card_update_icon.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/osmand_orange"/>
|
||||
<size
|
||||
android:width="32dp"
|
||||
android:height="32dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:drawable="@drawable/ic_action_reset_to_default_dark"
|
||||
android:gravity="center"/>
|
||||
</layer-list>
|
165
OsmAnd/res/layout/travel_download_update_card.xml
Normal file
165
OsmAnd/res/layout/travel_download_update_card.xml
Normal file
|
@ -0,0 +1,165 @@
|
|||
<?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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/travel_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/content_padding"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/bottom_sheet_content_padding_small">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/content_padding"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?attr/wikivoyage_primary_text_color"
|
||||
android:textSize="@dimen/travel_card_title_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="Download file"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/travel_card_download_icon"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/wikivoyage_secondary_text"
|
||||
android:textSize="@dimen/travel_card_title_size"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
tools:text="Download this Wikivoyage travel guides file to view articles about places around the world without an internet connection."/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bottom_sheet_selected_item_title_height"
|
||||
android:layout_marginBottom="@dimen/content_padding"
|
||||
android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
|
||||
android:layout_marginRight="@dimen/bottom_sheet_content_margin_small"
|
||||
android:background="@drawable/travel_card_stroke_bg"
|
||||
android:paddingLeft="@dimen/content_padding"
|
||||
android:paddingRight="@dimen/content_padding">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/content_padding"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_action_read_article"
|
||||
tools:tint="?attr/wikivoyage_active_color"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?attr/wikivoyage_primary_text_color"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="Wikivoyage"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/wikivoyage_secondary_text"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
tools:text="255 Mb • Update 11 April"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/bottom_sheet_content_margin_small"
|
||||
android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
|
||||
android:layout_marginRight="@dimen/bottom_sheet_content_margin_small">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/wikivoyage_secondary_btn_bg">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/left_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/wikivoyage_card_button_height"
|
||||
android:layout_gravity="center"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="?attr/wikivoyage_active_color"
|
||||
android:textSize="@dimen/text_button_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="Later"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/bottom_sheet_content_margin_small"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/wikivoyage_primary_btn_bg">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/right_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/wikivoyage_card_button_height"
|
||||
android:layout_gravity="center"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="?attr/wikivoyage_primary_btn_text_color"
|
||||
android:textSize="@dimen/text_button_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="Update"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -101,6 +101,7 @@
|
|||
<dimen name="default_sub_text_size_small">12sp</dimen>
|
||||
<dimen name="welcome_header_text_size">27sp</dimen>
|
||||
<dimen name="text_button_text_size">22sp</dimen>
|
||||
<dimen name="travel_card_title_text_size">22sp</dimen>
|
||||
|
||||
<dimen name="dialog_header_text_size">24sp</dimen>
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<attr name="wikivoyage_bottom_bar_bg_color" format="reference"/>
|
||||
<attr name="wikivoyage_bottom_bar_divider_color" format="reference"/>
|
||||
<attr name="wikivoyage_secondary_btn_bg_color" format="reference"/>
|
||||
<attr name="wikivoyage_primary_btn_text_color" format="reference"/>
|
||||
<attr name="wikivoyage_welcome_bg_color" format="reference"/>
|
||||
<attr name="wikivoyage_primary_text_color" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
|
|
@ -421,6 +421,8 @@
|
|||
<color name="wikivoyage_bottom_bar_divider_dark">#2d3133</color>
|
||||
<color name="wikivoyage_secondary_btn_bg_light">#f0f0f0</color>
|
||||
<color name="wikivoyage_secondary_btn_bg_dark">#2d3133</color>
|
||||
<color name="wikivoyage_primary_btn_text_light">#ffffff</color>
|
||||
<color name="wikivoyage_primary_btn_text_dark">#cccccc</color>
|
||||
<color name="wikivoyage_welcome_bg_light">#ffffff</color>
|
||||
<color name="wikivoyage_welcome_bg_dark">#000000</color>
|
||||
<color name="wikivoyage_primary_text_light">#212121</color>
|
||||
|
|
|
@ -175,6 +175,7 @@
|
|||
<dimen name="default_sub_text_size_small">10sp</dimen>
|
||||
<dimen name="welcome_header_text_size">23sp</dimen>
|
||||
<dimen name="text_button_text_size">15sp</dimen>
|
||||
<dimen name="travel_card_title_text_size">15sp</dimen>
|
||||
|
||||
<dimen name="default_split_segments_overview">13sp</dimen>
|
||||
<dimen name="default_split_segments_data">13sp</dimen>
|
||||
|
|
|
@ -210,6 +210,7 @@
|
|||
<item name="wikivoyage_bottom_bar_bg_color">@color/wikivoyage_bottom_bar_bg_light</item>
|
||||
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_light</item>
|
||||
<item name="wikivoyage_secondary_btn_bg_color">@color/wikivoyage_secondary_btn_bg_light</item>
|
||||
<item name="wikivoyage_primary_btn_text_color">@color/wikivoyage_primary_btn_text_light</item>
|
||||
<item name="wikivoyage_welcome_bg_color">@color/wikivoyage_welcome_bg_light</item>
|
||||
<item name="wikivoyage_primary_text_color">@color/wikivoyage_primary_text_light</item>
|
||||
</style>
|
||||
|
@ -410,6 +411,7 @@
|
|||
<item name="wikivoyage_bottom_bar_bg_color">@color/wikivoyage_bottom_bar_bg_dark</item>
|
||||
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_dark</item>
|
||||
<item name="wikivoyage_secondary_btn_bg_color">@color/wikivoyage_secondary_btn_bg_dark</item>
|
||||
<item name="wikivoyage_primary_btn_text_color">@color/wikivoyage_primary_btn_text_dark</item>
|
||||
<item name="wikivoyage_welcome_bg_color">@color/wikivoyage_welcome_bg_dark</item>
|
||||
<item name="wikivoyage_primary_text_color">@color/wikivoyage_primary_text_dark</item>
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue