Changed string, fixed some UI issues with loading indicator on radius
This commit is contained in:
parent
8c546712b4
commit
bfdbb6ec10
4 changed files with 12 additions and 9 deletions
|
@ -4,8 +4,8 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginBottom="3dp">
|
android:layout_marginBottom="5dp">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
android:layout_marginLeft="4dp"/>
|
android:layout_marginLeft="4dp"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/header"
|
<TextView android:id="@+id/header"
|
||||||
android:text="@string/search_radius"
|
android:text="@string/search_radius_proximity"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:layout_marginRight="3dp">
|
android:layout_marginRight="3dp">
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -73,14 +73,15 @@ public class ConfigureSettingsMenu {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> adapterView, View view, int pos, long l) {
|
public void onItemClick(AdapterView<?> adapterView, View view, int pos, long l) {
|
||||||
onMenuItemClick(items.get(pos), (CheckBox) view.findViewById(R.id.check));
|
onMenuItemClick(items.get(pos), (CheckBox) view.findViewById(R.id.check));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//checkBox should be set only if u have checkBox preference
|
//checkBox should be set only if u have checkBox preference
|
||||||
private void onMenuItemClick(ConfigureMapMenuItem item, CheckBox ch) {
|
private void onMenuItemClick(ConfigureMapMenuItem item, CheckBox ch) {
|
||||||
if (item.type == LAYER) {
|
if (item.type == BACK_HEADER){
|
||||||
|
app.getMapActivity().getMapActions().createOptionsMenuAsDrawer(false);
|
||||||
|
} else if (item.type == LAYER) {
|
||||||
if (ch != null){
|
if (ch != null){
|
||||||
ch.setChecked(!ch.isChecked());
|
ch.setChecked(!ch.isChecked());
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,13 +360,14 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
|
||||||
int value = WaypointHelper.SEARCH_RADIUS_VALUES[i];
|
int value = WaypointHelper.SEARCH_RADIUS_VALUES[i];
|
||||||
if (waypointHelper.getPoiSearchDeviationRadius() != value){
|
if (waypointHelper.getPoiSearchDeviationRadius() != value){
|
||||||
running[0] = position;
|
running[0] = position;
|
||||||
|
thisAdapter.notifyDataSetInvalidated();
|
||||||
waypointHelper.setPoiSearchDeviationRadius(value);
|
waypointHelper.setPoiSearchDeviationRadius(value);
|
||||||
radius.setText(OsmAndFormatter.getFormattedDistance(value, app));
|
radius.setText(OsmAndFormatter.getFormattedDistance(value, app));
|
||||||
recalculatePoints(running, thisAdapter, WaypointHelper.POI);
|
recalculatePoints(running, thisAdapter, WaypointHelper.POI);
|
||||||
dialogInterface.dismiss();
|
dialogInterface.dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).setTitle(app.getString(R.string.search_radius)+ " " + app.getString(R.string.poi))
|
}).setTitle(app.getString(R.string.search_radius_proximity)+ " " + app.getString(R.string.poi))
|
||||||
.setNegativeButton(R.string.default_buttons_cancel, null)
|
.setNegativeButton(R.string.default_buttons_cancel, null)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
@ -395,13 +396,14 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
|
||||||
int value = WaypointHelper.SEARCH_RADIUS_VALUES[i];
|
int value = WaypointHelper.SEARCH_RADIUS_VALUES[i];
|
||||||
if (waypointHelper.getSearchDeviationRadius() != value){
|
if (waypointHelper.getSearchDeviationRadius() != value){
|
||||||
running[0] = position;
|
running[0] = position;
|
||||||
|
thisAdapter.notifyDataSetInvalidated();
|
||||||
waypointHelper.setSearchDeviationRadius(value);
|
waypointHelper.setSearchDeviationRadius(value);
|
||||||
radius.setText(OsmAndFormatter.getFormattedDistance(value, app));
|
radius.setText(OsmAndFormatter.getFormattedDistance(value, app));
|
||||||
recalculatePoints(running, thisAdapter, -1);
|
recalculatePoints(running, thisAdapter, -1);
|
||||||
dialogInterface.dismiss();
|
dialogInterface.dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).setTitle(app.getString(R.string.search_radius))
|
}).setTitle(app.getString(R.string.search_radius_proximity))
|
||||||
.setNegativeButton(R.string.default_buttons_cancel, null)
|
.setNegativeButton(R.string.default_buttons_cancel, null)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue