From 7f84c18eac439a9b3f10d428d29da58d58b9942a Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Mon, 25 Mar 2019 10:23:16 +0200 Subject: [PATCH 1/8] fix value check logic and add length filters to edtiTexts in simple and advanced edit poi fragments --- .../plus/osmedit/AdvancedEditPoiFragment.java | 6 ++++++ .../osmand/plus/osmedit/BasicEditPoiFragment.java | 15 ++++++++++++++- .../plus/osmedit/EditPoiDialogFragment.java | 9 ++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java index bc5dd9d2ef..38a342b246 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java @@ -1,10 +1,13 @@ package net.osmand.plus.osmedit; +import static net.osmand.plus.osmedit.EditPoiDialogFragment.AMENITY_TEXT_LENGTH; + import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.Editable; +import android.text.InputFilter; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; @@ -205,6 +208,9 @@ public class AdvancedEditPoiFragment extends BaseOsmAndFragment }); final AutoCompleteTextView valueEditText = (AutoCompleteTextView) convertView.findViewById(R.id.valueEditText); + valueEditText.setFilters(new InputFilter[] { + new InputFilter.LengthFilter(AMENITY_TEXT_LENGTH) + }); tagEditText.setText(tg); tagEditText.setAdapter(tagAdapter); tagEditText.setThreshold(1); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java index 4c52132564..228cf584be 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java @@ -1,5 +1,7 @@ package net.osmand.plus.osmedit; +import static net.osmand.plus.osmedit.EditPoiDialogFragment.AMENITY_TEXT_LENGTH; + import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; @@ -7,6 +9,9 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.text.Editable; +import android.text.InputFilter; +import android.text.InputFilter.LengthFilter; +import android.text.Spanned; import android.text.TextUtils; import android.text.TextWatcher; import android.util.TypedValue; @@ -46,7 +51,7 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment private EditText webSiteEditText; private EditText descriptionEditText; OpeningHoursAdapter mOpeningHoursAdapter; - + private boolean basicTagsInitialized = false; @Nullable @@ -78,6 +83,9 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment openingHoursImageView.setImageDrawable( getPaintedContentIcon(R.drawable.ic_action_time, iconColor)); + InputFilter[] lengthLimit = new InputFilter[] { + new InputFilter.LengthFilter(AMENITY_TEXT_LENGTH) + }; streetEditText = (EditText) view.findViewById(R.id.streetEditText); houseNumberEditText = (EditText) view.findViewById(R.id.houseNumberEditText); phoneEditText = (EditText) view.findViewById(R.id.phoneEditText); @@ -88,6 +96,11 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment addTextWatcher(OSMSettings.OSMTagKey.PHONE.getValue(), phoneEditText); addTextWatcher(OSMSettings.OSMTagKey.ADDR_HOUSE_NUMBER.getValue(), houseNumberEditText); addTextWatcher(OSMSettings.OSMTagKey.DESCRIPTION.getValue(), descriptionEditText); + streetEditText.setFilters(lengthLimit); + houseNumberEditText.setFilters(lengthLimit); + phoneEditText.setFilters(lengthLimit); + webSiteEditText.setFilters(lengthLimit); + descriptionEditText.setFilters(lengthLimit); Button addOpeningHoursButton = (Button) view.findViewById(R.id.addOpeningHoursButton); addOpeningHoursButton.setOnClickListener(new View.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java index 5f46d5d387..9aabc22266 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java @@ -48,6 +48,7 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import java.util.Map.Entry; import net.osmand.CallbackWithObject; import net.osmand.PlatformUtil; import net.osmand.data.Amenity; @@ -108,6 +109,8 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { private TextInputLayout poiTypeTextInputLayout; private View view; + public static final int AMENITY_TEXT_LENGTH= 255; + @Override public void onAttach(Context activity) { super.onAttach(activity); @@ -438,9 +441,9 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { } private String isTextLengthInRange() { - for (String s: editPoiData.getChangedTags()) { - if (editPoiData.getTag(s).length() > 255) { - return s; + for (Entry s: editPoiData.getTagValues().entrySet()) { + if (s.getValue().length() > AMENITY_TEXT_LENGTH) { + return s.getKey(); } } return ""; From 821f5241014f0e952688b51a64c299c2cb868dd5 Mon Sep 17 00:00:00 2001 From: Dmitriy Prodchenko Date: Mon, 25 Mar 2019 15:31:44 +0200 Subject: [PATCH 2/8] Fix UA strings --- OsmAnd/res/values-uk/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 492c2ebc34..24bb59bdb6 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -657,7 +657,7 @@ Оновити мапу Додати POI Так - Скасувати + Відміна Застосувати Додати Ні @@ -1218,7 +1218,7 @@ Додати наступним пунктом призначення Виберіть GPX… Виберіть пункт призначення - Виберіть на мапі + Вибрати на мапі Закладки Уподобання маршруту Інформація про маршрут @@ -1325,7 +1325,7 @@ Завжди питати Виберіть інтервал для запису треку (включається через віджет запису GPX на мапі). Загальний інтервал запису треку - До початку + Дім Наявні оновлення для %1$s мап Шукати Показати усе @@ -1377,7 +1377,7 @@ Тип лижні Не використовувати маршрутизацію версії 1.9 Північної широти - Не надсилати + Скасувати Аудіо Поділитись нотаткою Нотатки From f2193a67163819770622fa5668358797b6bea457 Mon Sep 17 00:00:00 2001 From: crimean Date: Tue, 26 Mar 2019 12:00:35 +0300 Subject: [PATCH 3/8] Fix translation --- OsmAnd/res/values-pt-rBR/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index d4cda2e234..f428d79794 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -998,7 +998,7 @@ Pôr do Sol: %2$s Endereço web de rastreamento on-line Registro de trilha usando o widget do GPX ou através das configurações de \'Gravação de viagem\'. Mostrar trilha atual - Você pode fazer o download ou atualizar os mapas de % %1$s. + Você pode fazer o download ou atualizar os mapas de %1$s. Versão gratuita Mostrar descrição do POI. América do Norte From 137005374a791c258242c56da8c5afecacb58b57 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 26 Mar 2019 12:31:41 +0200 Subject: [PATCH 4/8] Fix night colors theme for route preparation --- .../res/drawable/bg_map_route_menu_dark.xml | 12 +++ .../res/drawable/bg_map_route_menu_light.xml | 12 +++ OsmAnd/res/drawable/btn_border_dark.xml | 2 +- .../res/drawable/btn_border_rounded_dark.xml | 2 +- .../btn_border_trans_rounded_dark.xml | 2 +- .../res/drawable/route_info_menu_bg_dark.xml | 2 +- .../drawable/route_info_menu_bg_left_dark.xml | 2 +- .../route_info_menu_bg_left_light.xml | 2 +- .../res/drawable/route_info_menu_bg_light.xml | 2 +- .../route_info_trans_gradient_dark.xml | 6 +- .../route_info_trans_gradient_left_dark.xml | 6 +- OsmAnd/res/layout/gpx_route_card.xml | 8 +- OsmAnd/res/layout/history_card_item.xml | 6 +- OsmAnd/res/layout/home_work_card.xml | 16 ++-- OsmAnd/res/layout/plan_route_info.xml | 33 ++++---- OsmAnd/res/layout/prev_route_card.xml | 11 ++- OsmAnd/res/layout/route_info_card.xml | 5 +- OsmAnd/res/layout/route_info_header.xml | 30 +++---- OsmAnd/res/layout/route_info_list_item.xml | 13 +-- .../route_info_menu_control_buttons.xml | 5 +- OsmAnd/res/layout/route_info_statistic.xml | 15 ++-- .../res/layout/route_waypoints_fragment.xml | 20 ++--- OsmAnd/res/layout/transport_route_card.xml | 16 ++-- OsmAnd/res/layout/warning_card.xml | 4 +- OsmAnd/res/values/attrs.xml | 4 + OsmAnd/res/values/colors.xml | 6 +- OsmAnd/res/values/styles.xml | 8 ++ .../activities/actions/AppModeDialog.java | 6 +- .../net/osmand/plus/helpers/GpxUiHelper.java | 7 +- .../TransportStopRouteAdapter.java | 2 +- .../controllers/MapMarkerMenuController.java | 2 +- .../MapRouteInfoMenu.java | 4 +- .../MapRouteInfoMenuFragment.java | 38 +++++---- .../RouteDetailsFragment.java | 80 +++++++++++-------- .../WaypointsFragment.java | 49 ++++++------ .../routepreparationmenu/cards/BaseCard.java | 17 +++- .../cards/HomeWorkCard.java | 2 +- .../cards/MapMarkersCard.java | 20 ++++- .../cards/PublicTransportCard.java | 35 +++----- .../cards/RouteInfoCard.java | 8 +- .../cards/SimpleRouteCard.java | 41 +++------- .../cards/TracksCard.java | 15 +++- .../cards/WarningCard.java | 5 +- 43 files changed, 328 insertions(+), 253 deletions(-) create mode 100644 OsmAnd/res/drawable/bg_map_route_menu_dark.xml create mode 100644 OsmAnd/res/drawable/bg_map_route_menu_light.xml diff --git a/OsmAnd/res/drawable/bg_map_route_menu_dark.xml b/OsmAnd/res/drawable/bg_map_route_menu_dark.xml new file mode 100644 index 0000000000..0d562594da --- /dev/null +++ b/OsmAnd/res/drawable/bg_map_route_menu_dark.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/bg_map_route_menu_light.xml b/OsmAnd/res/drawable/bg_map_route_menu_light.xml new file mode 100644 index 0000000000..7fe82fad4c --- /dev/null +++ b/OsmAnd/res/drawable/bg_map_route_menu_light.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/btn_border_dark.xml b/OsmAnd/res/drawable/btn_border_dark.xml index f50714a963..c965b828f9 100644 --- a/OsmAnd/res/drawable/btn_border_dark.xml +++ b/OsmAnd/res/drawable/btn_border_dark.xml @@ -3,7 +3,7 @@ - + diff --git a/OsmAnd/res/drawable/btn_border_rounded_dark.xml b/OsmAnd/res/drawable/btn_border_rounded_dark.xml index 3f68423d61..e823922421 100644 --- a/OsmAnd/res/drawable/btn_border_rounded_dark.xml +++ b/OsmAnd/res/drawable/btn_border_rounded_dark.xml @@ -3,7 +3,7 @@ - + diff --git a/OsmAnd/res/drawable/btn_border_trans_rounded_dark.xml b/OsmAnd/res/drawable/btn_border_trans_rounded_dark.xml index 0f134230b1..8f24f9d643 100644 --- a/OsmAnd/res/drawable/btn_border_trans_rounded_dark.xml +++ b/OsmAnd/res/drawable/btn_border_trans_rounded_dark.xml @@ -4,7 +4,7 @@ - + diff --git a/OsmAnd/res/drawable/route_info_menu_bg_dark.xml b/OsmAnd/res/drawable/route_info_menu_bg_dark.xml index d70013e6ab..a11dcffe2b 100644 --- a/OsmAnd/res/drawable/route_info_menu_bg_dark.xml +++ b/OsmAnd/res/drawable/route_info_menu_bg_dark.xml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/OsmAnd/res/drawable/route_info_menu_bg_left_dark.xml b/OsmAnd/res/drawable/route_info_menu_bg_left_dark.xml index 49659f9130..a8b289d96f 100644 --- a/OsmAnd/res/drawable/route_info_menu_bg_left_dark.xml +++ b/OsmAnd/res/drawable/route_info_menu_bg_left_dark.xml @@ -6,7 +6,7 @@ + android:color="@color/card_and_list_background_dark" /> \ No newline at end of file diff --git a/OsmAnd/res/drawable/route_info_menu_bg_left_light.xml b/OsmAnd/res/drawable/route_info_menu_bg_left_light.xml index 6737137cbf..409ef5548a 100644 --- a/OsmAnd/res/drawable/route_info_menu_bg_left_light.xml +++ b/OsmAnd/res/drawable/route_info_menu_bg_left_light.xml @@ -6,7 +6,7 @@ + android:color="@color/card_and_list_background_light" /> \ No newline at end of file diff --git a/OsmAnd/res/drawable/route_info_menu_bg_light.xml b/OsmAnd/res/drawable/route_info_menu_bg_light.xml index 994263f690..9f2c519521 100644 --- a/OsmAnd/res/drawable/route_info_menu_bg_light.xml +++ b/OsmAnd/res/drawable/route_info_menu_bg_light.xml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/OsmAnd/res/drawable/route_info_trans_gradient_dark.xml b/OsmAnd/res/drawable/route_info_trans_gradient_dark.xml index cf3653787d..9e1d1e15f0 100644 --- a/OsmAnd/res/drawable/route_info_trans_gradient_dark.xml +++ b/OsmAnd/res/drawable/route_info_trans_gradient_dark.xml @@ -4,9 +4,9 @@ diff --git a/OsmAnd/res/drawable/route_info_trans_gradient_left_dark.xml b/OsmAnd/res/drawable/route_info_trans_gradient_left_dark.xml index 96c55a8fc3..c11b514532 100644 --- a/OsmAnd/res/drawable/route_info_trans_gradient_left_dark.xml +++ b/OsmAnd/res/drawable/route_info_trans_gradient_left_dark.xml @@ -4,9 +4,9 @@ diff --git a/OsmAnd/res/layout/gpx_route_card.xml b/OsmAnd/res/layout/gpx_route_card.xml index 3d295abb7d..7cba5e7b2d 100644 --- a/OsmAnd/res/layout/gpx_route_card.xml +++ b/OsmAnd/res/layout/gpx_route_card.xml @@ -24,7 +24,7 @@ android:id="@+id/card_content" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/route_info_bg" + android:background="?attr/card_and_list_background_basic" android:baselineAligned="false" android:gravity="center_vertical" android:orientation="vertical" @@ -44,7 +44,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/list_content_padding" android:layout_marginLeft="@dimen/list_content_padding" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" tools:text="Tracks on the map - 10" /> @@ -71,7 +71,7 @@ android:layout_gravity="top" android:layout_marginStart="@dimen/route_info_list_text_padding" android:layout_marginLeft="@dimen/route_info_list_text_padding" - android:background="?attr/dashboard_divider" /> + android:background="?attr/divider_color_basic" /> @@ -72,7 +72,7 @@ android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" - android:textColor="?android:textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" tools:text="City" /> diff --git a/OsmAnd/res/layout/home_work_card.xml b/OsmAnd/res/layout/home_work_card.xml index 308d4c2b23..3c6ffc0d01 100644 --- a/OsmAnd/res/layout/home_work_card.xml +++ b/OsmAnd/res/layout/home_work_card.xml @@ -25,7 +25,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/route_info_card_row_min_height" - android:background="?attr/route_info_bg" + android:background="?attr/card_and_list_background_basic" android:baselineAligned="false" android:gravity="center_vertical" android:orientation="horizontal"> @@ -50,7 +50,7 @@ android:layout_marginEnd="@dimen/favorites_icon_right_margin" android:layout_marginRight="@dimen/favorites_icon_right_margin" android:src="@drawable/ic_action_home_dark" - android:tint="?attr/route_info_control_icon_color" /> + android:tint="@color/description_font_and_bottom_sheet_icons" /> @@ -79,7 +79,7 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/home_button" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" tools:ignore="UnusedAttribute" tools:text="Amsterdam" /> @@ -94,7 +94,7 @@ android:layout_height="match_parent" android:layout_marginTop="12dp" android:layout_marginBottom="12dp" - android:background="?attr/divider_color" /> + android:background="?attr/divider_color_basic" /> + android:tint="@color/description_font_and_bottom_sheet_icons" /> @@ -145,7 +145,7 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/work_button" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" tools:ignore="UnusedAttribute" tools:text="Business centre" /> diff --git a/OsmAnd/res/layout/plan_route_info.xml b/OsmAnd/res/layout/plan_route_info.xml index 9757e28b1a..7554053368 100644 --- a/OsmAnd/res/layout/plan_route_info.xml +++ b/OsmAnd/res/layout/plan_route_info.xml @@ -136,6 +136,7 @@ android:layout_marginRight="@dimen/list_content_padding" android:layout_marginBottom="3dp" android:text="@string/route_from" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> @@ -182,10 +183,10 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/shared_string_swap" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> @@ -297,10 +299,10 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/shared_string_edit" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> @@ -409,10 +412,10 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/shared_string_add" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> + android:background="?attr/divider_color_basic" + android:focusable="false" /> + tools:ignore="UnusedAttribute" /> + android:textColor="@color/description_font_and_bottom_sheet_icons" /> @@ -69,7 +69,7 @@ android:layout_marginEnd="@dimen/favorites_icon_right_margin" android:layout_marginRight="@dimen/favorites_icon_right_margin" android:src="@drawable/ic_action_previous_route" - android:tint="?attr/route_info_control_icon_color" /> + android:tint="@color/description_font_and_bottom_sheet_icons" /> diff --git a/OsmAnd/res/layout/route_info_header.xml b/OsmAnd/res/layout/route_info_header.xml index d0ce6aa034..d2ba9e5148 100644 --- a/OsmAnd/res/layout/route_info_header.xml +++ b/OsmAnd/res/layout/route_info_header.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/route_info_bg" + android:background="?attr/card_and_list_background_basic" android:orientation="vertical"> @@ -51,7 +51,7 @@ android:layout_height="wrap_content" android:background="@null" android:text="@string/total_distance" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> @@ -83,7 +83,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_list_text_size" osmand:typeface="@string/font_roboto_medium" tools:text="20 min" /> @@ -94,7 +94,7 @@ android:layout_height="wrap_content" android:background="@null" android:text="@string/shared_string_time" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> @@ -148,7 +148,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" - android:textColor="?android:attr/textColorPrimary" + android:textColor="?attr/main_font_color_basic" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" tools:text="40 m" /> @@ -159,7 +159,7 @@ android:layout_height="wrap_content" android:background="@null" android:text="@string/average_altitude" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> @@ -191,7 +191,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" - android:textColor="?android:attr/textColorPrimary" + android:textColor="?attr/main_font_color_basic" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" tools:text="30m - 53m" /> @@ -202,7 +202,7 @@ android:layout_height="wrap_content" android:background="@null" android:text="@string/altitude_range" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> @@ -230,7 +230,7 @@ + android:background="?attr/divider_color_basic" /> @@ -245,7 +245,7 @@ + android:background="?attr/divider_color_basic" /> @@ -284,7 +284,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" - android:textColor="?android:attr/textColorPrimary" + android:textColor="?attr/main_font_color_basic" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" tools:text="174" /> @@ -295,7 +295,7 @@ android:layout_height="wrap_content" android:background="@null" android:text="@string/altitude_ascent" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> @@ -327,7 +327,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" - android:textColor="?android:attr/textColorPrimary" + android:textColor="?attr/main_font_color_basic" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" tools:text="164" /> @@ -338,7 +338,7 @@ android:layout_height="wrap_content" android:background="@null" android:text="@string/altitude_descent" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_sub_text_size" /> diff --git a/OsmAnd/res/layout/route_info_list_item.xml b/OsmAnd/res/layout/route_info_list_item.xml index 64d70e1024..5c37687c69 100644 --- a/OsmAnd/res/layout/route_info_list_item.xml +++ b/OsmAnd/res/layout/route_info_list_item.xml @@ -3,7 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="?attr/bg_color" + android:background="?attr/selectableItemBackground" android:orientation="vertical"> @@ -35,7 +35,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:textColor="@color/color_distance" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/default_sub_text_size" android:textStyle="bold" tools:text="0:50"/> @@ -62,7 +62,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:textColor="@color/color_distance" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/default_sub_text_size" android:textStyle="bold" tools:text="@string/app_version"/> @@ -73,7 +73,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:textSize="@dimen/default_sub_text_size" - android:textColor="@color/color_distance" + android:textColor="?attr/active_color_basic" android:textStyle="bold" tools:text="@string/app_version"/> @@ -88,6 +88,7 @@ android:layout_gravity="center_vertical" android:layout_weight="1" android:textSize="@dimen/default_desc_text_size" + android:textColor="?attr/main_font_color_basic" tools:text="Head Dmytrivska Street" android:text=""/> @@ -97,6 +98,6 @@ android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="1dp" - android:background="?attr/dashboard_divider"/> + android:background="?attr/divider_color_basic"/> \ No newline at end of file diff --git a/OsmAnd/res/layout/route_info_menu_control_buttons.xml b/OsmAnd/res/layout/route_info_menu_control_buttons.xml index fbdce267b2..e0f86e4a31 100644 --- a/OsmAnd/res/layout/route_info_menu_control_buttons.xml +++ b/OsmAnd/res/layout/route_info_menu_control_buttons.xml @@ -17,6 +17,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/selectableItemBackground" + android:textColor="?attr/active_color_basic" android:ellipsize="end" android:gravity="center" android:letterSpacing="@dimen/text_button_letter_spacing" @@ -33,7 +34,9 @@ + android:layout_height="match_parent" + android:background="?attr/divider_color_basic" + android:visibility="gone"/> @@ -84,6 +85,7 @@ android:id="@+id/info_divider" android:layout_width="1dp" android:layout_height="match_parent" + android:background="?attr/divider_color_basic" android:paddingBottom="@dimen/list_item_button_padding" /> @@ -161,10 +164,10 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/rendering_category_details" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> diff --git a/OsmAnd/res/layout/route_waypoints_fragment.xml b/OsmAnd/res/layout/route_waypoints_fragment.xml index 5c771696b7..673ad46c75 100644 --- a/OsmAnd/res/layout/route_waypoints_fragment.xml +++ b/OsmAnd/res/layout/route_waypoints_fragment.xml @@ -49,12 +49,14 @@ android:ellipsize="end" android:maxLines="1" android:text="@string/shared_string_target_points" - android:textAppearance="@style/TextAppearance.ListItemCategoryTitle" /> + android:textColor="?attr/main_font_color_basic" + android:textSize="@dimen/default_list_text_size" + osmand:typeface="@string/font_roboto_medium"/> + tools:ignore="UnusedAttribute" /> @@ -124,11 +126,10 @@ android:paddingRight="8dp" android:text="@string/shared_string_add" android:textSize="@dimen/text_button_text_size" + android:textColor="?attr/active_color_basic" osmand:typeface="@string/font_roboto_medium" tools:drawableLeft="@drawable/ic_action_plus" - tools:drawableStart="@drawable/ic_action_plus" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> @@ -156,13 +157,12 @@ android:maxLines="1" android:paddingLeft="8dp" android:paddingRight="8dp" + android:textColor="?attr/active_color_basic" android:text="@string/shared_string_clear_all" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" tools:drawableLeft="@drawable/ic_action_clear_all" - tools:drawableStart="@drawable/ic_action_clear_all" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> diff --git a/OsmAnd/res/layout/transport_route_card.xml b/OsmAnd/res/layout/transport_route_card.xml index f6ea2f1398..98a67061f2 100644 --- a/OsmAnd/res/layout/transport_route_card.xml +++ b/OsmAnd/res/layout/transport_route_card.xml @@ -20,14 +20,14 @@ android:id="@+id/top_divider" android:layout_width="match_parent" android:layout_height="1dp" - android:background="?attr/dashboard_divider" + android:background="?attr/divider_color_basic" android:focusable="false" /> @@ -60,7 +60,7 @@ android:id="@+id/way_line" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_regular" tools:text="@string/route_from" /> @@ -92,10 +92,10 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/rendering_category_details" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> @@ -119,10 +119,10 @@ android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:text="@string/shared_string_show_on_map" + android:textColor="?attr/active_color_basic" android:textSize="@dimen/text_button_text_size" osmand:typeface="@string/font_roboto_medium" - tools:ignore="UnusedAttribute" - tools:textColor="?attr/wikivoyage_active_color" /> + tools:ignore="UnusedAttribute" /> diff --git a/OsmAnd/res/layout/warning_card.xml b/OsmAnd/res/layout/warning_card.xml index f30342d630..95df7fb73d 100644 --- a/OsmAnd/res/layout/warning_card.xml +++ b/OsmAnd/res/layout/warning_card.xml @@ -32,7 +32,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="@dimen/content_padding" android:letterSpacing="@dimen/text_button_letter_spacing" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" tools:ignore="UnusedAttribute" tools:text="@string/public_transport_warning_title" /> @@ -42,7 +42,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:letterSpacing="@dimen/text_button_letter_spacing" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/description_font_and_bottom_sheet_icons" android:textSize="@dimen/default_desc_text_size" tools:ignore="UnusedAttribute" tools:text="@string/public_transport_warning_descr_blog" /> diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index 38065089cf..b65758b949 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -108,6 +108,10 @@ + + + + diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index c9c171378d..c45e679134 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -456,9 +456,11 @@ #17191a - #17191a + #101112 #ff8800 - #17191a + #101112 + #E68200 + #17181a #f0f0f0 #222526 #ffffff diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index deda11d80d..17fe82227b 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -240,6 +240,10 @@ @color/route_info_bg_light @drawable/flow_toolbar_bg_light + @color/divider_light + @color/main_font_light + @color/active_buttons_and_links_light + @color/card_and_list_background_light