From a2cd9ff134a12627feec7d058d8317d1db072b95 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Thu, 10 Mar 2016 08:59:45 +0300 Subject: [PATCH] Fix https://github.com/osmandapp/Osmand/issues/2317 --- .../other/DestinationReachedMenuFragment.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java index 9b0f071173..07c0d6c453 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java @@ -10,6 +10,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageButton; +import android.widget.TextView; import net.osmand.AndroidUtils; import net.osmand.data.LatLon; @@ -49,7 +50,7 @@ public class DestinationReachedMenuFragment extends Fragment { IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache(); ImageButton closeImageButton = (ImageButton) view.findViewById(R.id.closeImageButton); - closeImageButton.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_remove_dark)); + closeImageButton.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_remove_dark, menu.isLight())); closeImageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -59,7 +60,8 @@ public class DestinationReachedMenuFragment extends Fragment { Button removeDestButton = (Button) view.findViewById(R.id.removeDestButton); removeDestButton.setCompoundDrawablesWithIntrinsicBounds( - iconsCache.getContentIcon(R.drawable.ic_action_done), null, null, null); + iconsCache.getContentIcon(R.drawable.ic_action_done, menu.isLight()), null, null, null); + AndroidUtils.setTextPrimaryColor(view.getContext(), removeDestButton, !menu.isLight()); removeDestButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -78,7 +80,8 @@ public class DestinationReachedMenuFragment extends Fragment { Button recalcDestButton = (Button) view.findViewById(R.id.recalcDestButton); recalcDestButton.setCompoundDrawablesWithIntrinsicBounds( - iconsCache.getContentIcon(R.drawable.ic_action_gdirections_dark), null, null, null); + iconsCache.getContentIcon(R.drawable.ic_action_gdirections_dark, menu.isLight()), null, null, null); + AndroidUtils.setTextPrimaryColor(view.getContext(), recalcDestButton, !menu.isLight()); recalcDestButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -99,7 +102,8 @@ public class DestinationReachedMenuFragment extends Fragment { Button findParkingButton = (Button) view.findViewById(R.id.findParkingButton); findParkingButton.setCompoundDrawablesWithIntrinsicBounds( - iconsCache.getContentIcon(R.drawable.ic_action_parking_dark), null, null, null); + iconsCache.getContentIcon(R.drawable.ic_action_parking_dark, menu.isLight()), null, null, null); + AndroidUtils.setTextPrimaryColor(view.getContext(), findParkingButton, !menu.isLight()); findParkingButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -124,6 +128,8 @@ public class DestinationReachedMenuFragment extends Fragment { AndroidUtils.setBackground(view.getContext(), mainView, !menu.isLight(), R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark); } + TextView title = (TextView) view.findViewById(R.id.titleTextView); + AndroidUtils.setTextPrimaryColor(view.getContext(), title, !menu.isLight()); return view; }