Merge pull request #5157 from osmandapp/VisibleSearchRadius
Visible search radius
This commit is contained in:
commit
17f30ca428
3 changed files with 8 additions and 3 deletions
|
@ -39,12 +39,12 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/empty_search_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/nothing_found"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
tools:text="@string/nothing_found_in_radius" />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/empty_search_description"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="nothing_found_in_radius">We did not find anything in the radius:</string>
|
||||
<string name="select_waypoints_category_description">You can add all of the track\'s waypoints, or select separate categories.</string>
|
||||
<string name="shared_string_total">Total</string>
|
||||
<string name="clear_all_intermediates">Clear all intermediate points</string>
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.osmand.access.AccessibilityAssistant;
|
|||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.osm.AbstractPoiType;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||
|
@ -235,7 +236,10 @@ public class QuickSearchListAdapter extends ArrayAdapter<QuickSearchListItem> {
|
|||
boolean moreDividerVisible = emptySearchVisible && searchMoreItem.isSearchMoreAvailable();
|
||||
view.findViewById(R.id.empty_search).setVisibility(emptySearchVisible ? View.VISIBLE : View.GONE);
|
||||
view.findViewById(R.id.more_divider).setVisibility(moreDividerVisible ? View.VISIBLE : View.GONE);
|
||||
|
||||
SearchUICore searchUICore = app.getSearchUICore().getCore();
|
||||
String textTitle = app.getString(R.string.nothing_found_in_radius) + " "
|
||||
+ OsmAndFormatter.getFormattedDistance(searchUICore.getMinimalSearchRadius(searchUICore.getPhrase()), app);
|
||||
((TextView) view.findViewById(R.id.empty_search_title)).setText(textTitle);
|
||||
View increaseRadiusRow = view.findViewById(R.id.increase_radius_row);
|
||||
increaseRadiusRow.setVisibility(searchMoreItem.isSearchMoreAvailable() ? View.VISIBLE : View.GONE);
|
||||
increaseRadiusRow.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
Loading…
Reference in a new issue