forked from organicmaps/organicmaps
[android] fix for "more" layout icons position for RTL locales in case of RTL layout.
Signed-off-by: Dzmitry Yarmolenka <dzmitry.yarmolenka.1986@gmail.com>
This commit is contained in:
parent
8aa4cd94d4
commit
d28d122daa
4 changed files with 6 additions and 6 deletions
|
@ -84,7 +84,7 @@ public class AdvancedTimetableFragment extends BaseMwmFragment
|
|||
|
||||
private void setExampleDrawables(@DrawableRes int left, @DrawableRes int right)
|
||||
{
|
||||
mExamplesTitle.setCompoundDrawablesWithIntrinsicBounds(Graphics.tint(getActivity(), left, R.attr.colorAccent), null,
|
||||
mExamplesTitle.setCompoundDrawablesRelativeWithIntrinsicBounds(Graphics.tint(getActivity(), left, R.attr.colorAccent), null,
|
||||
Graphics.tint(getActivity(), right, R.attr.colorAccent), null);
|
||||
}
|
||||
|
||||
|
|
|
@ -555,11 +555,11 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||
{
|
||||
if (arrowResourceId == 0)
|
||||
{
|
||||
mNamesCaption.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
|
||||
mNamesCaption.setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, null, null);
|
||||
return;
|
||||
}
|
||||
|
||||
mNamesCaption.setCompoundDrawablesWithIntrinsicBounds(
|
||||
mNamesCaption.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
null,
|
||||
null,
|
||||
Graphics.tint(getActivity(), arrowResourceId, R.attr.iconTint),
|
||||
|
|
|
@ -273,7 +273,7 @@ final class RoutingBottomMenuController implements View.OnClickListener
|
|||
R.drawable.ic_altitude_difference);
|
||||
int colorAccent = ContextCompat.getColor(mContext,
|
||||
UiUtils.getStyledResourceId(mContext, R.attr.colorAccent));
|
||||
mAltitudeDifference.setCompoundDrawablesWithIntrinsicBounds(Graphics.tint(icon, colorAccent),
|
||||
mAltitudeDifference.setCompoundDrawablesRelativeWithIntrinsicBounds(Graphics.tint(icon, colorAccent),
|
||||
null, null, null);
|
||||
UiUtils.show(mAltitudeDifference);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public final class Graphics
|
|||
for (int i = 0; i < dlist.length; i++)
|
||||
dlist[i] = tint(view.getContext(), dlist[i], tintAttr);
|
||||
|
||||
view.setCompoundDrawablesWithIntrinsicBounds(dlist[0], dlist[1], dlist[2], dlist[3]);
|
||||
view.setCompoundDrawablesRelativeWithIntrinsicBounds(dlist[0], dlist[1], dlist[2], dlist[3]);
|
||||
}
|
||||
|
||||
public static void tint(TextView view, ColorStateList tintColors)
|
||||
|
@ -86,7 +86,7 @@ public final class Graphics
|
|||
for (int i = 0; i < dlist.length; i++)
|
||||
dlist[i] = tint(dlist[i], tintColors);
|
||||
|
||||
view.setCompoundDrawablesWithIntrinsicBounds(dlist[0], dlist[1], dlist[2], dlist[3]);
|
||||
view.setCompoundDrawablesRelativeWithIntrinsicBounds(dlist[0], dlist[1], dlist[2], dlist[3]);
|
||||
}
|
||||
|
||||
public static Drawable tint(Context context, @DrawableRes int resId)
|
||||
|
|
Loading…
Add table
Reference in a new issue