diff --git a/OsmAnd/res/drawable/rectangle_rounded_left.xml b/OsmAnd/res/drawable/rectangle_rounded_left.xml
new file mode 100644
index 0000000000..56b3235c6c
--- /dev/null
+++ b/OsmAnd/res/drawable/rectangle_rounded_left.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/OsmAnd/res/drawable/ripple_rectangle_rounded_left.xml b/OsmAnd/res/drawable/ripple_rectangle_rounded_left.xml
new file mode 100644
index 0000000000..c63df94daf
--- /dev/null
+++ b/OsmAnd/res/drawable/ripple_rectangle_rounded_left.xml
@@ -0,0 +1,11 @@
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
index 5fdea403d3..8b3fc01882 100644
--- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
@@ -445,6 +445,9 @@ public class ContextMenuAdapter {
ImageView imageView = (ImageView) convertView.findViewById(R.id.secondary_icon);
imageView.setImageDrawable(drawable);
imageView.setVisibility(View.VISIBLE);
+ if (secondaryDrawable == R.drawable.ic_action_additional_option) {
+ UiUtilities.rotateImageByLayoutDirection(imageView);
+ }
} else {
ImageView imageView = (ImageView) convertView.findViewById(R.id.secondary_icon);
if (imageView != null) {
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java
index c4fa160e08..7bebeda1f2 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java
@@ -275,16 +275,14 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL
TextViewEx toolbarTitle = (TextViewEx) toolbar.findViewById(R.id.toolbar_title);
toolbarTitle.setText(R.string.osm_live);
- View closeButton = toolbar.findViewById(R.id.close_button);
+ ImageView closeButton = (ImageView) toolbar.findViewById(R.id.close_button);
+ UiUtilities.rotateImageByLayoutDirection(closeButton);
closeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
- if (closeButton instanceof ImageView) {
- UiUtilities.rotateImageByLayoutDirection((ImageView) closeButton);
- }
FrameLayout iconHelpContainer = toolbar.findViewById(R.id.action_button);
int iconColorResId = nightMode ? R.color.active_buttons_and_links_text_dark : R.color.active_buttons_and_links_text_light;
@@ -443,6 +441,8 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL
boolean isLastChild, View convertView, ViewGroup parent) {
LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
convertView = inflater.inflate(R.layout.list_item_triple_row_icon_and_menu, parent, false);
+ ImageView secondaryIcon = (ImageView) convertView.findViewById(R.id.secondary_icon);
+ UiUtilities.rotateImageByLayoutDirection(secondaryIcon);
LiveMapsViewHolder viewHolder = new LiveMapsViewHolder(convertView);
convertView.setTag(viewHolder);
viewHolder.bindLocalIndexInfo(getChild(groupPosition, childPosition).getFileName());
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
index 858e32c962..1fd19e00c1 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
@@ -134,6 +134,7 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
public static void updateCustomButtonView(OsmandApplication app, ApplicationMode mode, View customView, boolean checked, boolean nightMode) {
Context themedCtx = UiUtilities.getThemedContext(app, nightMode);
+ boolean isLayoutRtl = AndroidUtils.isLayoutRtl(themedCtx);
LinearLayout buttonView = customView.findViewById(R.id.button_container);
int bgColor;
@@ -149,10 +150,11 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
ContextCompat.getColor(app, getActivePrimaryColorId(nightMode)), checked ? 0.3f : 0.5f);
}
- int bgResId = R.drawable.rectangle_rounded_right;
+ int bgResId = isLayoutRtl ? R.drawable.rectangle_rounded_left : R.drawable.rectangle_rounded_right;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
- int selectableResId = R.drawable.ripple_rectangle_rounded_right;
-
+ int selectableResId = isLayoutRtl ?
+ R.drawable.ripple_rectangle_rounded_left :
+ R.drawable.ripple_rectangle_rounded_right;
Drawable bgDrawable = app.getUIUtilities().getPaintedIcon(bgResId, bgColor);
Drawable selectable = app.getUIUtilities().getPaintedIcon(selectableResId, selectedColor);
Drawable[] layers = {bgDrawable, selectable};