#3726 Add map legend (#3839)

* strings: add strings for map legend

* nearby: split description into a layout and add legend

* nearby: add newline at end of file
This commit is contained in:
Bryan Hauser 2020-06-29 12:11:26 -04:00 committed by GitHub
parent a14bbf5725
commit dea629c2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 81 additions and 1 deletions

View file

@ -127,7 +127,8 @@ public class MainActivity extends NavigationBaseActivity implements FragmentMana
tabLayout.getTabAt(1).setCustomView(nearbyTabLinearLayout); tabLayout.getTabAt(1).setCustomView(nearbyTabLinearLayout);
nearbyInfo.setOnClickListener(view -> nearbyInfo.setOnClickListener(view ->
new AlertDialog.Builder(MainActivity.this).setTitle(R.string.title_activity_nearby).setMessage(R.string.showcase_view_whole_nearby_activity) new AlertDialog.Builder(MainActivity.this).setTitle(R.string.title_activity_nearby)
.setView(getLayoutInflater().inflate(R.layout.dialog_nearby, null))
.setCancelable(true) .setCancelable(true)
.setPositiveButton(android.R.string.ok, (dialog, id) -> dialog.cancel()) .setPositiveButton(android.R.string.ok, (dialog, id) -> dialog.cancel())
.create() .create()

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/showcase_view_whole_nearby_activity"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_custom_map_marker" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/showcase_view_needs_photo"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_custom_map_marker_green" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/showcase_view_has_photo"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_custom_map_marker_grey" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/showcase_view_no_longer_exists"/>
</LinearLayout>
</LinearLayout>

View file

@ -331,6 +331,9 @@
<string name="retry">Retry</string> <string name="retry">Retry</string>
<string name="showcase_view_got_it_button">Got it!</string> <string name="showcase_view_got_it_button">Got it!</string>
<string name="showcase_view_whole_nearby_activity">These are the places near you that need pictures to illustrate their Wikipedia articles.\n\nClicking on \'SEARCH THIS AREA\' locks the map and launches a nearby search around that location.</string> <string name="showcase_view_whole_nearby_activity">These are the places near you that need pictures to illustrate their Wikipedia articles.\n\nClicking on \'SEARCH THIS AREA\' locks the map and launches a nearby search around that location.</string>
<string name="showcase_view_needs_photo">This place needs a photo.</string>
<string name="showcase_view_has_photo">This place already has a photo.</string>
<string name="showcase_view_no_longer_exists">This place no longer exists.</string>
<string name="showcase_view_list_icon">Tapping this button brings up a list of these places</string> <string name="showcase_view_list_icon">Tapping this button brings up a list of these places</string>
<string name="showcase_view_plus_fab">You can upload a picture for any place from your gallery or camera</string> <string name="showcase_view_plus_fab">You can upload a picture for any place from your gallery or camera</string>