Merge pull request #11238 from osmandapp/rtl_fix

Rtl fix xml and Announcement time
This commit is contained in:
Vitaliy 2021-03-28 22:38:03 +03:00 committed by GitHub
commit 1b532acbe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 288 additions and 112 deletions

View file

@ -160,7 +160,9 @@
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding_small" />
<RelativeLayout
android:layout_width="wrap_content"

View file

@ -17,7 +17,9 @@
android:layout_marginRight="@dimen/content_padding"
android:layout_marginBottom="@dimen/content_padding_small"
android:tint="?attr/default_icon_color"
osmand:srcCompat="@drawable/ic_action_user_account" />
osmand:srcCompat="@drawable/ic_action_user_account"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<LinearLayout
android:layout_width="wrap_content"
@ -26,7 +28,9 @@
android:layout_marginTop="@dimen/subHeaderPadding"
android:layout_marginRight="@dimen/content_padding"
android:layout_marginBottom="@dimen/subHeaderPadding"
android:orientation="vertical">
android:orientation="vertical"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/account_title"

View file

@ -52,7 +52,9 @@
android:text="@string/select_color"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/color_name"
@ -67,7 +69,9 @@
android:text="@string/select_color"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
<LinearLayout

View file

@ -86,6 +86,8 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:paddingBottom="@dimen/content_padding" />
android:paddingBottom="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/content_padding_small" />
</LinearLayout>

View file

@ -8,7 +8,9 @@
android:paddingBottom="@dimen/content_padding_small"
android:minHeight="@dimen/card_row_min_height"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<TextView
android:id="@+id/description"

View file

@ -57,7 +57,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/content_padding_half"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding">
android:layout_marginRight="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding">
<LinearLayout
android:id="@+id/text"

View file

@ -7,4 +7,6 @@
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingTop="@dimen/content_padding_small"
android:paddingBottom="@dimen/content_padding_small" />
android:paddingBottom="@dimen/content_padding_small"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />

View file

@ -11,7 +11,9 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding">
android:paddingRight="@dimen/content_padding"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@android:id/title"
@ -43,6 +45,8 @@
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
</LinearLayout>

View file

@ -90,7 +90,9 @@
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:layout_width="wrap_content"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/end_button_icon"

View file

@ -90,7 +90,9 @@
android:layout_gravity="center"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
tools:src="@drawable/ic_action_info_dark" />
tools:src="@drawable/ic_action_info_dark"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
</LinearLayout>

View file

@ -6,7 +6,9 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding">
android:paddingRight="@dimen/content_padding"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding">
<com.jaredrummler.android.colorpicker.ColorPickerView
android:id="@+id/color_picker_view"

View file

@ -49,7 +49,9 @@
android:background="@drawable/dashboard_button_light"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_navigation_drawer"
tools:visibility="gone"/>
tools:visibility="gone"
android:layout_marginEnd="@dimen/multi_selection_menu_padding_top"
android:layout_marginStart="@dimen/multi_selection_menu_padding_top" />
<TextView
android:id="@+id/toolbar_text"
@ -80,7 +82,9 @@
android:layout_gravity="end"
android:background="@drawable/dashboard_button_light"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_configure_screen_dark"/>
app:srcCompat="@drawable/ic_configure_screen_dark"
android:layout_marginEnd="@dimen/multi_selection_menu_padding_top"
android:layout_marginStart="@dimen/multi_selection_menu_padding_top" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/toolbar_ok"
@ -91,7 +95,9 @@
android:layout_height="match_parent"
android:background="@drawable/dashboard_button_light"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_action_done"/>
app:srcCompat="@drawable/ic_action_done"
android:layout_marginEnd="@dimen/multi_selection_menu_padding_top"
android:layout_marginStart="@dimen/multi_selection_menu_padding_top" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/toolbar_sort"
@ -102,7 +108,9 @@
android:layout_height="match_parent"
android:background="@drawable/dashboard_button_light"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_sort_waypoint_dark"/>
app:srcCompat="@drawable/ic_sort_waypoint_dark"
android:layout_marginStart="@dimen/multi_selection_menu_padding_top"
android:layout_marginEnd="@dimen/multi_selection_menu_padding_top" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/toolbar_flat"
@ -114,7 +122,9 @@
android:background="@drawable/dashboard_button_light"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_flat_list_dark"
android:visibility="gone"/>
android:visibility="gone"
android:layout_marginEnd="@dimen/multi_selection_menu_padding_top"
android:layout_marginStart="@dimen/multi_selection_menu_padding_top" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/toolbar_edit"
@ -126,7 +136,9 @@
android:background="@drawable/dashboard_button_light"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_action_edit_dark"
android:visibility="gone"/>
android:visibility="gone"
android:layout_marginEnd="@dimen/multi_selection_menu_padding_top"
android:layout_marginStart="@dimen/multi_selection_menu_padding_top" />
</LinearLayout>
</LinearLayout>

View file

@ -13,7 +13,8 @@
android:layout_marginRight="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginBottom="@dimen/content_padding_small"
tools:ignore="UselessParent">
tools:ignore="UselessParent"
android:layout_marginEnd="@dimen/content_padding">
<FrameLayout
android:id="@+id/button_container"

View file

@ -14,4 +14,6 @@
android:textColor="?attr/active_color_basic"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_medium"
tools:text="@string/read_more" />
tools:text="@string/read_more"
android:paddingStart="@dimen/content_padding_half"
android:paddingEnd="@dimen/content_padding_half" />

View file

@ -20,7 +20,9 @@
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginTop="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
app:srcCompat="@drawable/ic_action_sdcard_warning_colored" />
app:srcCompat="@drawable/ic_action_sdcard_warning_colored"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<LinearLayout
android:layout_width="match_parent"
@ -29,7 +31,9 @@
android:layout_marginTop="@dimen/measurement_tool_menu_title_padding_top"
android:layout_marginRight="@dimen/content_padding"
android:layout_marginBottom="@dimen/measurement_tool_menu_title_padding_top"
android:orientation="vertical">
android:orientation="vertical"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/warning_title"

View file

@ -27,7 +27,9 @@
android:paddingBottom="@dimen/content_padding_half"
tools:itemCount="3"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/point_editor_icon_category_item" />
tools:listitem="@layout/point_editor_icon_category_item"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/track_list"

View file

@ -52,7 +52,9 @@
android:paddingRight="@dimen/content_padding"
android:paddingBottom="@dimen/bottom_sheet_title_padding_bottom"
android:visibility="invisible"
tools:visibility="visible">
tools:visibility="visible"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/file_size"
@ -94,7 +96,9 @@
android:layout_marginLeft="@dimen/content_padding_half"
android:layout_marginTop="@dimen/content_padding_half"
android:layout_marginRight="@dimen/content_padding_half"
android:layout_marginBottom="@dimen/content_padding_half">
android:layout_marginBottom="@dimen/content_padding_half"
android:layout_marginEnd="@dimen/content_padding_half"
android:layout_marginStart="@dimen/content_padding_half">
<include
android:id="@+id/continue_button"

View file

@ -164,7 +164,9 @@
android:paddingTop="@dimen/measurement_tool_button_margin"
android:paddingBottom="@dimen/measurement_tool_button_margin"
android:paddingLeft="@dimen/measurement_tool_button_margin"
android:paddingRight="@dimen/measurement_tool_button_margin">
android:paddingRight="@dimen/measurement_tool_button_margin"
android:paddingStart="@dimen/measurement_tool_button_margin"
android:paddingEnd="@dimen/measurement_tool_button_margin">
<FrameLayout
android:layout_width="0dp"

View file

@ -44,7 +44,9 @@
android:textAlignment="center"
android:textColor="?android:textColorPrimary"
android:textSize="20sp"
app:typeface="@string/font_roboto_medium" />
app:typeface="@string/font_roboto_medium"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/start_opr_description"
@ -58,7 +60,9 @@
android:textColor="?android:textColorPrimary"
android:textColorLink="@color/icon_color_active_light"
android:textSize="@dimen/default_list_text_size"
app:typeface="@string/font_roboto_regular" />
app:typeface="@string/font_roboto_regular"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
</LinearLayout>
@ -73,7 +77,9 @@
android:layout_marginTop="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding"
android:layout_marginBottom="@dimen/content_padding_small"
android:orientation="vertical">
android:orientation="vertical"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding">
<include
android:id="@+id/register_opr_create_account"

View file

@ -158,7 +158,9 @@
android:paddingBottom="@dimen/dialog_content_margin"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:stepSize="1" />
android:stepSize="1"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<View
android:layout_width="match_parent"
@ -236,7 +238,9 @@
android:layout_weight="1"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:stepSize="1" />
android:stepSize="1"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/zoom_value_max"

View file

@ -45,7 +45,9 @@
android:textColor="?attr/app_bar_primary_item_color"
android:textSize="@dimen/dialog_header_text_size"
app:typeface="@string/font_roboto_medium"
tools:text="@string/routing_settings_2" />
tools:text="@string/routing_settings_2"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<FrameLayout
android:id="@+id/action_button"

View file

@ -120,7 +120,9 @@
android:paddingLeft="@dimen/content_padding"
android:paddingTop="@dimen/content_padding_half"
android:paddingRight="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding_half">
android:paddingBottom="@dimen/content_padding_half"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<TextView
android:layout_width="0dp"

View file

@ -21,7 +21,9 @@
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:minHeight="@dimen/dialog_button_height"
android:paddingTop="@dimen/content_padding" />
android:paddingTop="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<net.osmand.plus.views.controls.WrapContentHeightViewPager
android:id="@+id/pager"

View file

@ -20,7 +20,9 @@
android:textSize="@dimen/default_desc_text_size"
osmand:lineHeight="@dimen/default_desc_line_height"
osmand:typeface="@string/font_roboto_regular"
tools:text="Amsterdam is the Netherlands' capital and financial, cultural and creative centre with more" />
tools:text="Amsterdam is the Netherlands' capital and financial, cultural and creative centre with more"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_overview"

View file

@ -30,7 +30,9 @@
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
app:typeface="@string/font_roboto_regular"
tools:text="@string/plugin_disabled_descr" />
tools:text="@string/plugin_disabled_descr"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<LinearLayout
android:id="@+id/buttons_container"
@ -39,7 +41,9 @@
android:layout_marginLeft="@dimen/content_padding_half"
android:layout_marginTop="@dimen/list_header_settings_top_margin"
android:layout_marginRight="@dimen/content_padding_half"
android:orientation="vertical" />
android:orientation="vertical"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginEnd="@dimen/content_padding_half" />
</LinearLayout>

View file

@ -19,7 +19,9 @@
android:text="@string/import_track_descr"
android:textAppearance="@style/TextAppearance.ContextMenuSubtitle"
android:textColor="?android:textColorSecondary"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_regular"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<include layout="@layout/bottom_sheet_item_simple" />

View file

@ -22,7 +22,9 @@
android:text="@string/export_profile_dialog_description"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
app:typeface="@string/font_roboto_regular" />
app:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<include
android:id="@+id/topSwitchDivider"

View file

@ -64,7 +64,9 @@
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
app:typeface="@string/font_roboto_regular"
tools:text="@string/plugin_disabled_descr" />
tools:text="@string/plugin_disabled_descr"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<include layout="@layout/card_bottom_divider" />

View file

@ -76,7 +76,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dashPadding"
android:layout_marginRight="@dimen/dashPadding"/>
android:layout_marginRight="@dimen/dashPadding"
android:layout_marginStart="@dimen/dashPadding"
android:layout_marginEnd="@dimen/dashPadding" />
</LinearLayout>

View file

@ -50,7 +50,9 @@
android:gravity="center"
android:visibility="gone"
android:background="?android:selectableItemBackground"
android:textColor="?attr/active_color_basic" />
android:textColor="?attr/active_color_basic"
android:paddingEnd="@dimen/bottom_sheet_content_margin"
android:paddingStart="@dimen/bottom_sheet_content_margin" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/disable_group_switch"

View file

@ -26,7 +26,9 @@
android:text="@string/navigate_to_track_descr"
android:textColor="@color/preference_category_title"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<include
android:id="@+id/pass_whole_route_container"

View file

@ -15,7 +15,9 @@
osmand:typeface="@string/font_roboto_medium"
android:textColor="@color/active_color_primary_light"
android:textSize="@dimen/default_list_text_size"
android:text="@string/navigation_profile" />
android:text="@string/navigation_profile"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
<LinearLayout
android:id="@+id/content_container"

View file

@ -16,7 +16,9 @@
android:paddingRight="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding_half"
tools:visibility="visible"
android:visibility="gone">
android:visibility="gone"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title"
@ -80,7 +82,9 @@
osmand:typeface="@string/font_roboto_regular"
tools:text="Description"
tools:visibility="visible"
android:visibility="gone" />
android:visibility="gone"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<LinearLayout
android:id="@+id/field_box_container"
@ -90,7 +94,9 @@
android:paddingRight="@dimen/content_padding"
android:orientation="vertical"
tools:visibility="visible"
android:visibility="gone">
android:visibility="gone"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<net.osmand.plus.widgets.OsmandTextFieldBoxes
android:id="@+id/field_box"

View file

@ -36,6 +36,8 @@
android:textSize="@dimen/default_list_text_size"
android:lineSpacingMultiplier="@dimen/bottom_sheet_text_spacing_multiplier"
osmand:typeface="@string/font_roboto_regular"
android:text="@string/add_photos_descr" />
android:text="@string/add_photos_descr"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
</LinearLayout>

View file

@ -12,7 +12,9 @@
android:layout_height="wrap_content"
android:paddingTop="@dimen/content_padding_small"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding">
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title"
@ -41,7 +43,9 @@
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
<include layout="@layout/divider" />

View file

@ -58,7 +58,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding">
android:layout_marginRight="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding">
<LinearLayout
@ -130,7 +132,9 @@
android:layout_weight="1"
android:hint="@string/shared_string_address"
app:boxBackgroundColor="@color/material_text_input_layout_bg"
app:hintAnimationEnabled="false">
app:hintAnimationEnabled="false"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/address_edit"
@ -200,7 +204,9 @@
android:layout_height="1dp"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:background="?attr/dashboard_divider" />
android:background="?attr/dashboard_divider"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<LinearLayout
android:id="@+id/description"
@ -220,7 +226,9 @@
android:layout_weight="1"
android:hint="@string/shared_string_description"
app:boxBackgroundColor="@color/material_text_input_layout_bg"
app:hintAnimationEnabled="false">
app:hintAnimationEnabled="false"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/description_edit"
@ -288,7 +296,9 @@
android:text="@string/select_group"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<LinearLayout
android:id="@+id/group_list_button"
@ -381,7 +391,9 @@
android:text="@string/select_icon_profile_dialog_title"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/group_name_recycler_view"
@ -431,7 +443,9 @@
android:text="@string/select_color"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/color_name"
@ -446,7 +460,9 @@
android:text="@string/select_color"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
<LinearLayout
@ -479,7 +495,9 @@
android:text="@string/select_shape"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/shape_name"
@ -494,7 +512,9 @@
android:text="@string/select_shape"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
<net.osmand.plus.widgets.FlowLayout

View file

@ -32,7 +32,9 @@
android:layout_height="@dimen/standard_icon_size"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
osmand:srcCompat="@drawable/ic_action_arrow_down" />
osmand:srcCompat="@drawable/ic_action_arrow_down"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
<LinearLayout
android:layout_width="0dp"
@ -41,7 +43,9 @@
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
android:orientation="vertical"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title_tv"

View file

@ -17,7 +17,9 @@
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
tools:text="Screen 1"
osmand:typeface="@string/font_roboto_medium" />
osmand:typeface="@string/font_roboto_medium"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<View android:id="@+id/divider"
android:layout_width="match_parent"

View file

@ -10,7 +10,9 @@
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView

View file

@ -23,7 +23,9 @@
android:layout_marginLeft="@dimen/dashCardMargin"
android:layout_marginRight="@dimen/dashCardMargin"
android:layout_gravity="center"
android:padding="@dimen/content_padding_small">
android:padding="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/dashCardMargin"
android:layout_marginStart="@dimen/dashCardMargin">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/action_icon"
@ -115,7 +117,9 @@
android:layout_marginLeft="@dimen/dashCardMargin"
android:layout_marginRight="@dimen/dashCardMargin"
android:layout_gravity="center"
android:padding="@dimen/content_padding_small">
android:padding="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/dashCardMargin"
android:layout_marginStart="@dimen/dashCardMargin">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/move_icon"

View file

@ -16,7 +16,9 @@
android:paddingRight="@dimen/content_padding"
android:textAppearance="@style/TextAppearance.ListItemTitle"
osmand:typeface="@string/font_roboto_regular"
tools:text="@string/pass_whole_track_descr" />
tools:text="@string/pass_whole_track_descr"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<include layout="@layout/custom_radio_buttons" />

View file

@ -16,7 +16,9 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding">
android:layout_marginRight="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
@ -76,7 +78,9 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:visibility="invisible">
android:visibility="invisible"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"

View file

@ -126,7 +126,9 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:paddingBottom="@dimen/content_padding" />
android:paddingBottom="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginStart="@dimen/content_padding_small" />
</LinearLayout>

View file

@ -20,7 +20,9 @@
android:text="@string/select_folder"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/select_folder_button"

View file

@ -92,7 +92,9 @@
android:text="@string/gpx_visibility_txt"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/visibility_name"
@ -107,7 +109,9 @@
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="@string/gpx_visibility_txt" />
tools:text="@string/gpx_visibility_txt"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
@ -138,7 +142,9 @@
android:paddingBottom="@dimen/context_menu_first_line_top_margin"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_regular"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<View
android:layout_width="match_parent"

View file

@ -47,7 +47,9 @@
android:text="@string/upload_anonymously"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding_small"
android:paddingEnd="@dimen/content_padding_small" />
</LinearLayout>

View file

@ -57,7 +57,9 @@
android:text="@string/close_changeset"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding_small"
android:paddingEnd="@dimen/content_padding_small" />
</LinearLayout>

View file

@ -70,7 +70,9 @@
android:paddingLeft="@dimen/content_padding"
android:paddingTop="@dimen/content_padding_small"
android:paddingRight="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding_small">
android:paddingBottom="@dimen/content_padding_small"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/check_box_title"

View file

@ -22,7 +22,9 @@
android:minHeight="@dimen/bottom_sheet_title_height"
android:orientation="vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding">
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<View
android:layout_width="@dimen/content_padding"

View file

@ -134,7 +134,9 @@
android:layout_marginRight="@dimen/content_padding_half"
android:background="?attr/flow_toolbar_bg"
android:visibility="gone"
tools:visibility="visible">
tools:visibility="visible"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginEnd="@dimen/content_padding_half">
<LinearLayout
android:layout_width="wrap_content"

View file

@ -68,7 +68,9 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:stepSize="1" />
android:stepSize="1"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
<LinearLayout
android:layout_width="match_parent"

View file

@ -83,7 +83,9 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:stepSize="1" />
android:stepSize="1"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" />
<LinearLayout
android:layout_width="match_parent"

View file

@ -176,7 +176,9 @@
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:drawableTint="?attr/wikivoyage_active_color"
tools:text="@string/mapillary_menu_title_username" />
tools:text="@string/mapillary_menu_title_username"
android:paddingStart="@dimen/content_padding_small_half"
android:paddingEnd="@dimen/content_padding_small_half" />
</LinearLayout>
<LinearLayout
@ -214,7 +216,9 @@
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:drawableTint="?attr/wikivoyage_active_color"
tools:text="@string/shared_string_profiles" />
tools:text="@string/shared_string_profiles"
android:paddingStart="@dimen/content_padding_small_half"
android:paddingEnd="@dimen/content_padding_small_half" />
</LinearLayout>
</LinearLayout>

View file

@ -78,7 +78,9 @@
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1"
android:stepSize="1" />
android:stepSize="1"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/zoom_value_max"

View file

@ -5,6 +5,9 @@ import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.StyleSpan;
import androidx.core.text.TextUtilsCompat;
import androidx.core.view.ViewCompat;
import net.osmand.Location;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
@ -12,6 +15,8 @@ import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.voice.AbstractPrologCommandPlayer;
import java.util.Locale;
public class AnnounceTimeDistances {
// Avoids false negatives: Pre-pone close announcements by this distance to allow for the possible over-estimation of the 'true' lead distance due to positioning error.
// A smaller value will increase the timing precision, but at the risk of missing prompts which do not meet the precision limit.
@ -36,12 +41,12 @@ public class AnnounceTimeDistances {
private float OFF_ROUTE_DISTANCE;
private float TURN_NOW_SPEED;
private int PREPARE_LONG_DISTANCE;
private final int PREPARE_LONG_DISTANCE;
private int PREPARE_LONG_DISTANCE_END;
private int PREPARE_DISTANCE;
private final int PREPARE_DISTANCE;
private int PREPARE_DISTANCE_END;
private int TURN_IN_DISTANCE;
private int TURN_IN_DISTANCE_END;
private final int TURN_IN_DISTANCE;
private final int TURN_IN_DISTANCE_END;
private int TURN_NOW_DISTANCE;
private int LONG_PNT_ANNOUNCE_RADIUS;
private int SHORT_PNT_ANNOUNCE_RADIUS;
@ -182,10 +187,7 @@ public class AnnounceTimeDistances {
}
// (2) time_with_current_speed < etalon_time_with_default_speed?
// check only if speed > 0
if (currentSpeed > 0 && (dist / currentSpeed - voicePromptDelayTimeSec) <= etalon / defSpeed) {
return true;
}
return false;
return currentSpeed > 0 && (dist / currentSpeed - voicePromptDelayTimeSec) <= etalon / defSpeed;
}
public float getSpeed(Location loc) {
@ -208,18 +210,21 @@ public class AnnounceTimeDistances {
return (int) (dist - voicePromptDelayTimeSec * speed);
}
private void appendTurnDesc(SpannableStringBuilder builder, String name, int dist, String meter, String second) {
appendTurnDesc(builder, name, dist, DEFAULT_SPEED, meter, second);
private void appendTurnDesc(OsmandApplication app, SpannableStringBuilder builder, String name, int dist, String meter, String second) {
appendTurnDesc(app, builder, name, dist, DEFAULT_SPEED, meter, second);
}
private void appendTurnDesc(SpannableStringBuilder builder, String name, int dist, float speed, String meter, String second) {
private void appendTurnDesc(OsmandApplication app, SpannableStringBuilder builder, String name, int dist, float speed, String meter, String second) {
int minDist = (dist / 5) * 5;
int time = (int) (dist / speed);
if (time > 15) {
// round to 5
time = (time / 5) * 5;
}
builder.append(String.format("\n%s: %d - %d %s, %d %s.", name, minDist, minDist + 5, meter, time, second));
String distStr = String.format("\n%s: %d - %d %s", name, minDist, minDist + 5, meter);
String timeStr = String.format("%d %s.", time, second);
builder.append(app.getString(R.string.ltr_or_rtl_combine_via_comma, distStr, timeStr));
}
public Spannable getIntervalsDescription(OsmandApplication app) {
@ -245,35 +250,35 @@ public class AnnounceTimeDistances {
builder.append(turn);
makeBold(builder, turn);
if (PREPARE_DISTANCE_END <= PREPARE_DISTANCE) {
appendTurnDesc(builder, prepare, PREPARE_DISTANCE, meter, second);
appendTurnDesc(app, builder, prepare, PREPARE_DISTANCE, meter, second);
}
if (PREPARE_LONG_DISTANCE_END <= PREPARE_LONG_DISTANCE) {
appendTurnDesc(builder, longPrepare, PREPARE_LONG_DISTANCE, meter, second);
appendTurnDesc(app, builder, longPrepare, PREPARE_LONG_DISTANCE, meter, second);
}
appendTurnDesc(builder, approach, TURN_IN_DISTANCE, meter, second);
appendTurnDesc(builder, passing, TURN_NOW_DISTANCE, TURN_NOW_SPEED, meter, second);
appendTurnDesc(app, builder, approach, TURN_IN_DISTANCE, meter, second);
appendTurnDesc(app, builder, passing, TURN_NOW_DISTANCE, TURN_NOW_SPEED, meter, second);
// Arrive at destination
appendTurnDesc(builder, arrive, (int) (getArrivalDistance()), meter, second);
appendTurnDesc(app, builder, arrive, (int) (getArrivalDistance()), meter, second);
makeBoldFormatted(builder, arrive);
// Off-route
if (getOffRouteDistance() > 0) {
appendTurnDesc(builder, offRoute, (int) getOffRouteDistance(), meter, second);
appendTurnDesc(app, builder, offRoute, (int) getOffRouteDistance(), meter, second);
makeBoldFormatted(builder, offRoute);
}
// Traffic warnings
builder.append(traffic);
makeBold(builder, traffic);
appendTurnDesc(builder, approach, LONG_ALARM_ANNOUNCE_RADIUS, meter, second);
appendTurnDesc(builder, passing, SHORT_ALARM_ANNOUNCE_RADIUS, meter, second);
appendTurnDesc(app, builder, approach, LONG_ALARM_ANNOUNCE_RADIUS, meter, second);
appendTurnDesc(app, builder, passing, SHORT_ALARM_ANNOUNCE_RADIUS, meter, second);
// Waypoint / Favorite / POI
builder.append(point);
makeBold(builder, point);
appendTurnDesc(builder, approach, LONG_PNT_ANNOUNCE_RADIUS, meter, second);
appendTurnDesc(builder, passing, SHORT_PNT_ANNOUNCE_RADIUS, meter, second);
appendTurnDesc(app, builder, approach, LONG_PNT_ANNOUNCE_RADIUS, meter, second);
appendTurnDesc(app, builder, passing, SHORT_PNT_ANNOUNCE_RADIUS, meter, second);
return builder;
}