From 3ff830701c4ce6a2620c919448dc0ed8713dd9ed Mon Sep 17 00:00:00 2001 From: ziem <zprzemek@vp.pl> Date: Wed, 20 May 2015 19:05:36 +0200 Subject: [PATCH] Added BTS map legend --- app/src/main/res/layout/map.xml | 101 +++++++++++++++--- app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/dimens.xml | 1 + .../main/res/values/translatable_strings.xml | 10 +- 4 files changed, 95 insertions(+), 18 deletions(-) diff --git a/app/src/main/res/layout/map.xml b/app/src/main/res/layout/map.xml index 56f6cb51..b839af85 100644 --- a/app/src/main/res/layout/map.xml +++ b/app/src/main/res/layout/map.xml @@ -1,31 +1,100 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - tools:context=".MapViewerOsmDroid" > + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + tools:context=".MapViewerOsmDroid"> <org.osmdroid.views.MapView android:id="@+id/mapview" android:layout_width="fill_parent" - android:layout_height="fill_parent" - /> - - <TextView + android:layout_height="fill_parent"/> + + <TextView + android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:id="@+id/textView" android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:text="@string/osm_contributors" - android:textStyle="normal" - android:singleLine="true" + android:layout_alignParentRight="true" android:linksClickable="true" - android:textColor="#ff454545" android:longClickable="false" - android:inputType="text|textUri" - android:numeric="signed" /> + android:singleLine="true" + android:text="@string/osm_contributors" + android:textColor="#ff454545" + android:textStyle="normal"/> + + <TableLayout + android:id="@+id/legend" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:background="@color/transparent_white" + android:padding="@dimen/small_padding"> + + <TableRow + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical"> + + <ImageView + android:src="@drawable/ic_map_pin_blue"/> + + <TextView + android:padding="@dimen/very_small_padding" + android:text="@string/currently_connected_bts" + android:textColor="@color/black" + android:textSize="10sp"/> + </TableRow> + + <TableRow + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical"> + + <ImageView + android:src="@drawable/ic_map_pin_green"/> + + <TextView + android:padding="@dimen/very_small_padding" + android:text="@string/well_known_encrypted_bts" + android:textColor="@color/black" + android:textIsSelectable="false" + android:textSize="10sp"/> + </TableRow> + + <TableRow + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical"> + + <ImageView + android:src="@drawable/ic_map_pin_orange"/> + + <TextView + android:padding="@dimen/very_small_padding" + android:text="@string/new_or_recently_added_bts" + android:textColor="@color/black" + android:textSize="10sp"/> + </TableRow> + + <TableRow + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical"> + + <ImageView + android:src="@drawable/ic_map_pin_red"/> + + <TextView + android:padding="@dimen/very_small_padding" + android:text="@string/unknown_or_insecure_bts" + android:textColor="@color/black" + android:textSize="10sp"/> + </TableRow> + </TableLayout> </RelativeLayout> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 4c37fff5..0070bc9e 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -2,6 +2,7 @@ <resources> <color name="white">#ffffffff</color> + <color name="transparent_white">#50ffffff</color> <color name="black">#ff000000</color> <color name="action_bar_color">#ff0d0d0d</color> <color name="green_text">#ff00FF00</color> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 62f73a66..fdf0ca53 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="small_padding">8dp</dimen> + <dimen name="very_small_padding">4dp</dimen> </resources> \ No newline at end of file diff --git a/app/src/main/res/values/translatable_strings.xml b/app/src/main/res/values/translatable_strings.xml index ca911881..ebce9f7a 100644 --- a/app/src/main/res/values/translatable_strings.xml +++ b/app/src/main/res/values/translatable_strings.xml @@ -325,8 +325,14 @@ <string name="measured_signal_strengths">Measured Signal Strengths</string> <string name="at_command_response_looking">*** Looking for AT serial devices…\n</string> - <string name="at_command_response_found">Found: </string>"" - <string name="at_command_response_setup_complete">*** Setup Complete ***\n</string>"" + <string name="at_command_response_found">Found: </string> + <string name="at_command_response_setup_complete">*** Setup Complete ***\n</string> + + <string name="currently_connected_bts">Currently connected BTS</string> + <string name="well_known_encrypted_bts">Well known encrypted BTS</string> + <string name="unknown_or_insecure_bts">Unknown or insecure BTS</string> + <string name="new_or_recently_added_bts">New or recently added BTS</string> + <string-array name="pref_ui_icons_entries"> <item>@string/ui_icon_flat</item> <item>@string/ui_icon_sense</item> -- GitLab