Merge pull request #2671 from njohnston/parking_fix
Only show "find parking" if destination is reached by car-derived modes
This commit is contained in:
commit
71b0ede6a6
1 changed files with 8 additions and 1 deletions
|
@ -14,6 +14,7 @@ import android.widget.TextView;
|
|||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.IconsCache;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper;
|
||||
|
@ -99,8 +100,14 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
Button findParkingButton = (Button) view.findViewById(R.id.findParkingButton);
|
||||
|
||||
ApplicationMode appMode = getMapActivity().getMyApplication().getRoutingHelper().getAppMode();
|
||||
|
||||
if (!appMode.isDerivedRoutingFrom(appMode.CAR)) {
|
||||
findParkingButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
findParkingButton.setCompoundDrawablesWithIntrinsicBounds(
|
||||
iconsCache.getIcon(R.drawable.ic_action_parking_dark, menu.isLight()), null, null, null);
|
||||
AndroidUtils.setTextPrimaryColor(view.getContext(), findParkingButton, !menu.isLight());
|
||||
|
|
Loading…
Reference in a new issue