Small refactoring of icon receiving and setup shareIcon to white color in all themes
This commit is contained in:
parent
64c5f1fef5
commit
02da17f726
1 changed files with 7 additions and 7 deletions
|
@ -259,6 +259,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
final MapActivity mapActivity = getMapActivity();
|
||||
final UiUtilities iconsCache = app.getUIUtilities();
|
||||
final View view = inflater.inflate(R.layout.search_dialog_fragment, container, false);
|
||||
|
||||
toolbarController = new QuickSearchToolbarController();
|
||||
|
@ -325,9 +326,9 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
|
||||
buttonToolbarView = view.findViewById(R.id.button_toolbar_layout);
|
||||
buttonToolbarImage = (ImageView) view.findViewById(R.id.buttonToolbarImage);
|
||||
buttonToolbarImage.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_marker_dark));
|
||||
buttonToolbarImage.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_marker_dark));
|
||||
buttonToolbarFilter = (ImageButton) view.findViewById(R.id.filterButton);
|
||||
buttonToolbarFilter.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_filter));
|
||||
buttonToolbarFilter.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_filter));
|
||||
buttonToolbarFilter.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -474,7 +475,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
if (!app.getSettings().isLightContent()) {
|
||||
toolbar.setBackgroundColor(ContextCompat.getColor(mapActivity, R.color.app_bar_color_dark));
|
||||
}
|
||||
Drawable icBack = app.getUIUtilities().getThemedIcon(AndroidUtils.getNavigationIconResId(app));
|
||||
Drawable icBack = iconsCache.getThemedIcon(AndroidUtils.getNavigationIconResId(app));
|
||||
toolbar.setNavigationIcon(icBack);
|
||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||
toolbar.setNavigationOnClickListener(
|
||||
|
@ -489,7 +490,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
);
|
||||
|
||||
toolbarEdit = (Toolbar) view.findViewById(R.id.toolbar_edit);
|
||||
toolbarEdit.setNavigationIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_remove_dark));
|
||||
toolbarEdit.setNavigationIcon(iconsCache.getIcon(R.drawable.ic_action_remove_dark));
|
||||
toolbarEdit.setNavigationContentDescription(R.string.shared_string_cancel);
|
||||
toolbarEdit.setNavigationOnClickListener(
|
||||
new OnClickListener() {
|
||||
|
@ -501,8 +502,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
);
|
||||
|
||||
titleEdit = (TextView) view.findViewById(R.id.titleEdit);
|
||||
Drawable shareIcon = app.getUIUtilities().getIcon(R.drawable.ic_action_gshare_dark,
|
||||
nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light);
|
||||
Drawable shareIcon = iconsCache.getIcon(R.drawable.ic_action_gshare_dark, R.color.color_white);
|
||||
shareIcon = AndroidUtils.getDrawableForDirection(app, shareIcon);
|
||||
ImageView shareButton = (ImageView) view.findViewById(R.id.shareButton);
|
||||
shareButton.setImageDrawable(shareIcon);
|
||||
|
@ -644,7 +644,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
|
||||
progressBar = (ProgressBar) view.findViewById(R.id.searchProgressBar);
|
||||
clearButton = (ImageButton) view.findViewById(R.id.clearButton);
|
||||
clearButton.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark));
|
||||
clearButton.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_remove_dark));
|
||||
clearButton.setOnClickListener(
|
||||
new OnClickListener() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue