Fix back arrow (RTL)
This commit is contained in:
parent
1a9fc81220
commit
ac69f89b8c
5 changed files with 14 additions and 4 deletions
|
@ -16,6 +16,7 @@ import android.view.View;
|
|||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
@ -187,7 +188,9 @@ public abstract class ChoosePlanDialogFragment extends BaseOsmAndDialogFragment
|
|||
}
|
||||
View view = inflate(R.layout.purchase_dialog_fragment, container);
|
||||
|
||||
view.findViewById(R.id.button_back).setOnClickListener(new OnClickListener() {
|
||||
ImageView buttonBack = view.findViewById(R.id.button_back);
|
||||
buttonBack.setImageResource(AndroidUtils.getNavigationIconResId(ctx));
|
||||
buttonBack.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
|
|
|
@ -14,6 +14,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
|
@ -58,6 +59,7 @@ public class HelpArticleDialogFragment extends DialogFragment {
|
|||
final View view = inflater.inflate(R.layout.fragment_help_article, container, false);
|
||||
|
||||
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
||||
toolbar.setNavigationIcon(AndroidUtils.getNavigationIconResId(getContext()));
|
||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -187,7 +187,9 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment
|
|||
toolbarTitle.setTextColor(nightMode
|
||||
? getResources().getColor(R.color.text_color_primary_dark)
|
||||
: getResources().getColor(R.color.list_background_color_dark));
|
||||
toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light)));
|
||||
toolbarButton.setImageDrawable(getPaintedContentIcon(
|
||||
AndroidUtils.getNavigationIconResId(app),
|
||||
getResources().getColor(R.color.text_color_secondary_light)));
|
||||
toolbarTitle.setText(screenType.titleRes);
|
||||
toolbarButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -103,7 +103,9 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment {
|
|||
? getResources().getColor(R.color.text_color_primary_dark)
|
||||
: getResources().getColor(R.color.list_background_color_dark));
|
||||
toolbarSubTitle.setTextColor(getResources().getColor(R.color.text_color_secondary_light));
|
||||
toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light)));
|
||||
toolbarButton.setImageDrawable(getPaintedContentIcon(
|
||||
AndroidUtils.getNavigationIconResId(app),
|
||||
getResources().getColor(R.color.text_color_secondary_light)));
|
||||
toolbarButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
|
|
@ -287,7 +287,8 @@ public class ImportDuplicatesFragment extends BaseOsmAndFragment implements View
|
|||
|
||||
private void setupToolbar(Toolbar toolbar) {
|
||||
toolbar.setTitle(R.string.import_duplicates_title);
|
||||
toolbar.setNavigationIcon(getPaintedContentIcon(R.drawable.ic_arrow_back,
|
||||
toolbar.setNavigationIcon(getPaintedContentIcon(
|
||||
AndroidUtils.getNavigationIconResId(app),
|
||||
nightMode
|
||||
? getResources().getColor(R.color.active_buttons_and_links_text_dark)
|
||||
: getResources().getColor(R.color.active_buttons_and_links_text_light)));
|
||||
|
|
Loading…
Reference in a new issue