From e342ad8226616feb5cbdad1525410b30a0162e98 Mon Sep 17 00:00:00 2001 From: Chumva Date: Mon, 30 Apr 2018 18:05:03 +0300 Subject: [PATCH 1/2] fixed ?attr in xml drawables --- ..._card_bg.xml => dialog_active_card_bg_dark.xml} | 4 ++-- .../res/drawable/dialog_active_card_bg_light.xml | 13 +++++++++++++ ...{travel_card_bg.xml => travel_card_bg_dark.xml} | 2 +- OsmAnd/res/drawable/travel_card_bg_light.xml | 12 ++++++++++++ ...troke_bg.xml => travel_card_stroke_bg_dark.xml} | 2 +- .../res/drawable/travel_card_stroke_bg_light.xml | 12 ++++++++++++ ...n_bg.xml => wikivoyage_primary_btn_bg_dark.xml} | 2 +- .../drawable/wikivoyage_primary_btn_bg_light.xml | 9 +++++++++ ...bg.xml => wikivoyage_secondary_btn_bg_dark.xml} | 4 ++-- .../drawable/wikivoyage_secondary_btn_bg_light.xml | 9 +++++++++ .../layout/fragment_wikivoyage_explore_dialog.xml | 2 +- .../fragment_wikivoyage_show_images_first_time.xml | 6 +++--- OsmAnd/res/layout/purchase_dialog_active_card.xml | 2 +- OsmAnd/res/layout/purchase_dialog_card.xml | 2 +- OsmAnd/res/layout/purchase_dialog_card_button.xml | 2 +- OsmAnd/res/layout/purchase_dialog_fragment.xml | 2 +- OsmAnd/res/layout/travel_download_update_card.xml | 8 ++++---- OsmAnd/res/layout/wikivoyage_open_beta_card.xml | 2 +- .../res/layout/wikivoyage_start_editing_card.xml | 2 +- OsmAnd/res/values/attrs.xml | 7 +++++++ OsmAnd/res/values/styles.xml | 14 ++++++++++++++ .../travelcards/TravelDownloadUpdateCard.java | 4 ++-- 22 files changed, 99 insertions(+), 23 deletions(-) rename OsmAnd/res/drawable/{dialog_active_card_bg.xml => dialog_active_card_bg_dark.xml} (72%) create mode 100644 OsmAnd/res/drawable/dialog_active_card_bg_light.xml rename OsmAnd/res/drawable/{travel_card_bg.xml => travel_card_bg_dark.xml} (82%) create mode 100644 OsmAnd/res/drawable/travel_card_bg_light.xml rename OsmAnd/res/drawable/{travel_card_stroke_bg.xml => travel_card_stroke_bg_dark.xml} (78%) create mode 100644 OsmAnd/res/drawable/travel_card_stroke_bg_light.xml rename OsmAnd/res/drawable/{wikivoyage_primary_btn_bg.xml => wikivoyage_primary_btn_bg_dark.xml} (76%) create mode 100644 OsmAnd/res/drawable/wikivoyage_primary_btn_bg_light.xml rename OsmAnd/res/drawable/{wikivoyage_secondary_btn_bg.xml => wikivoyage_secondary_btn_bg_dark.xml} (61%) create mode 100644 OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_light.xml diff --git a/OsmAnd/res/drawable/dialog_active_card_bg.xml b/OsmAnd/res/drawable/dialog_active_card_bg_dark.xml similarity index 72% rename from OsmAnd/res/drawable/dialog_active_card_bg.xml rename to OsmAnd/res/drawable/dialog_active_card_bg_dark.xml index ccf3936585..1806a6d0ce 100644 --- a/OsmAnd/res/drawable/dialog_active_card_bg.xml +++ b/OsmAnd/res/drawable/dialog_active_card_bg_dark.xml @@ -5,8 +5,8 @@ - - + + diff --git a/OsmAnd/res/drawable/dialog_active_card_bg_light.xml b/OsmAnd/res/drawable/dialog_active_card_bg_light.xml new file mode 100644 index 0000000000..ebae968061 --- /dev/null +++ b/OsmAnd/res/drawable/dialog_active_card_bg_light.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/travel_card_bg.xml b/OsmAnd/res/drawable/travel_card_bg_dark.xml similarity index 82% rename from OsmAnd/res/drawable/travel_card_bg.xml rename to OsmAnd/res/drawable/travel_card_bg_dark.xml index de280be397..2fbb593bc9 100644 --- a/OsmAnd/res/drawable/travel_card_bg.xml +++ b/OsmAnd/res/drawable/travel_card_bg_dark.xml @@ -5,7 +5,7 @@ - + diff --git a/OsmAnd/res/drawable/travel_card_bg_light.xml b/OsmAnd/res/drawable/travel_card_bg_light.xml new file mode 100644 index 0000000000..b8c94363a4 --- /dev/null +++ b/OsmAnd/res/drawable/travel_card_bg_light.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/travel_card_stroke_bg.xml b/OsmAnd/res/drawable/travel_card_stroke_bg_dark.xml similarity index 78% rename from OsmAnd/res/drawable/travel_card_stroke_bg.xml rename to OsmAnd/res/drawable/travel_card_stroke_bg_dark.xml index e629d12875..511f882de9 100644 --- a/OsmAnd/res/drawable/travel_card_stroke_bg.xml +++ b/OsmAnd/res/drawable/travel_card_stroke_bg_dark.xml @@ -5,7 +5,7 @@ + android:color="@color/wikivoyage_card_divider_dark"/> diff --git a/OsmAnd/res/drawable/travel_card_stroke_bg_light.xml b/OsmAnd/res/drawable/travel_card_stroke_bg_light.xml new file mode 100644 index 0000000000..f7e37d2cec --- /dev/null +++ b/OsmAnd/res/drawable/travel_card_stroke_bg_light.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/OsmAnd/res/drawable/wikivoyage_primary_btn_bg.xml b/OsmAnd/res/drawable/wikivoyage_primary_btn_bg_dark.xml similarity index 76% rename from OsmAnd/res/drawable/wikivoyage_primary_btn_bg.xml rename to OsmAnd/res/drawable/wikivoyage_primary_btn_bg_dark.xml index e709c76cc1..a1d6ff94c7 100644 --- a/OsmAnd/res/drawable/wikivoyage_primary_btn_bg.xml +++ b/OsmAnd/res/drawable/wikivoyage_primary_btn_bg_dark.xml @@ -2,7 +2,7 @@ - + diff --git a/OsmAnd/res/drawable/wikivoyage_primary_btn_bg_light.xml b/OsmAnd/res/drawable/wikivoyage_primary_btn_bg_light.xml new file mode 100644 index 0000000000..581c0d9f2e --- /dev/null +++ b/OsmAnd/res/drawable/wikivoyage_primary_btn_bg_light.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg.xml b/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_dark.xml similarity index 61% rename from OsmAnd/res/drawable/wikivoyage_secondary_btn_bg.xml rename to OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_dark.xml index 7b42cd135b..738d47c6cc 100644 --- a/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg.xml +++ b/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_dark.xml @@ -1,8 +1,8 @@ + android:shape="rectangle"> - + diff --git a/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_light.xml b/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_light.xml new file mode 100644 index 0000000000..5ae606dd50 --- /dev/null +++ b/OsmAnd/res/drawable/wikivoyage_secondary_btn_bg_light.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml index 4c834efca3..76c66b9e89 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml @@ -75,7 +75,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="@dimen/text_margin_small" android:layout_marginRight="@dimen/text_margin_small" - android:background="@drawable/wikivoyage_search_card_bg"> + android:background="?attr/wikivoyage_travel_card_bg"> + android:background="?attr/wikivoyage_secondary_btn_bg"> + android:background="?attr/wikivoyage_secondary_btn_bg"> + android:background="?attr/wikivoyage_primary_btn_bg"> diff --git a/OsmAnd/res/layout/purchase_dialog_card.xml b/OsmAnd/res/layout/purchase_dialog_card.xml index dfbc449d67..d511f68ece 100644 --- a/OsmAnd/res/layout/purchase_dialog_card.xml +++ b/OsmAnd/res/layout/purchase_dialog_card.xml @@ -7,7 +7,7 @@ android:layout_marginBottom="@dimen/list_header_padding" android:layout_marginLeft="@dimen/card_padding" android:layout_marginRight="@dimen/card_padding" - android:background="@drawable/dialog_card_bg" + android:background="?attr/wikivoyage_travel_card_bg" android:orientation="vertical"> diff --git a/OsmAnd/res/layout/purchase_dialog_card_button.xml b/OsmAnd/res/layout/purchase_dialog_card_button.xml index 7e70c781ac..bbe40ddedc 100644 --- a/OsmAnd/res/layout/purchase_dialog_card_button.xml +++ b/OsmAnd/res/layout/purchase_dialog_card_button.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/wikivoyage_active_card_bg"> + android:background="?attr/wikivoyage_primary_btn_bg"> + android:background="?attr/wikivoyage_travel_card_bg"> @@ -135,7 +135,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:background="@drawable/wikivoyage_secondary_btn_bg"> + android:background="?attr/wikivoyage_secondary_btn_bg"> + android:background="?attr/wikivoyage_primary_btn_bg"> + android:background="?attr/wikivoyage_travel_card_bg"> + + + + + + + diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index bcbd3ed781..85d654d46d 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -213,6 +213,13 @@ @color/wikivoyage_primary_btn_text_light @color/wikivoyage_welcome_bg_light @color/wikivoyage_primary_text_light + + @drawable/travel_card_bg_light + @drawable/travel_card_stroke_bg_light + @drawable/wikivoyage_secondary_btn_bg_light + @drawable/wikivoyage_primary_btn_bg_light + @drawable/dialog_active_card_bg_light +