Fix waypoitn dialog helper
This commit is contained in:
parent
a581218f8b
commit
ec012994dd
1 changed files with 25 additions and 20 deletions
|
@ -543,13 +543,7 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(flat) {
|
|
||||||
all.setImageResource(app.getSettings().isLightContent() ? R.drawable.ic_action_gdown_light
|
|
||||||
: R.drawable.ic_action_gdown_dark);
|
|
||||||
} else {
|
|
||||||
all.setImageResource(app.getSettings().isLightContent() ? R.drawable.ic_action_gup_light
|
|
||||||
: R.drawable.ic_action_gup_dark);
|
|
||||||
}
|
|
||||||
if(app.getTargetPointsHelper().getIntermediatePoints().size() > 0) {
|
if(app.getTargetPointsHelper().getIntermediatePoints().size() > 0) {
|
||||||
sort.setVisibility(View.VISIBLE);
|
sort.setVisibility(View.VISIBLE);
|
||||||
sort.setImageResource(app.getSettings().isLightContent() ? R.drawable.ic_sort_waypoint_white
|
sort.setImageResource(app.getSettings().isLightContent() ? R.drawable.ic_sort_waypoint_white
|
||||||
|
@ -567,20 +561,31 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
|
||||||
} else {
|
} else {
|
||||||
sort.setVisibility(View.GONE);
|
sort.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
if(waypointHelper.isRouteCalculated()) {
|
||||||
all.setOnClickListener(new View.OnClickListener() {
|
all.setVisibility(View.GONE);
|
||||||
@Override
|
} else {
|
||||||
public void onClick(View v) {
|
all.setVisibility(View.VISIBLE);
|
||||||
if(flat) {
|
if(flat) {
|
||||||
showWaypointsDialog(ctx, editF);
|
all.setImageResource(app.getSettings().isLightContent() ? R.drawable.ic_action_gdown_light
|
||||||
} else {
|
: R.drawable.ic_action_gdown_dark);
|
||||||
showWaypointsDialogFlat(ctx, editF);
|
} else {
|
||||||
}
|
all.setImageResource(app.getSettings().isLightContent() ? R.drawable.ic_action_gup_light
|
||||||
if(dlg != null) {
|
: R.drawable.ic_action_gup_dark);
|
||||||
dlg.dismiss();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
all.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if(flat) {
|
||||||
|
showWaypointsDialog(ctx, editF);
|
||||||
|
} else {
|
||||||
|
showWaypointsDialogFlat(ctx, editF);
|
||||||
|
}
|
||||||
|
if(dlg != null) {
|
||||||
|
dlg.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue