diff options
| author | Keith Packard <keithp@keithp.com> | 2015-05-28 22:13:39 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2015-05-28 22:14:39 -0700 |
| commit | 50e709a4088f3d6846fd66cbe9b8c437b3f9c88b (patch) | |
| tree | 5f7e469a626055c7379234b108115e257f93af84 /altosdroid/res | |
| parent | 2e424f8dc2886aa475e6ddb21457eba08f768b16 (diff) | |
altosdroid: Split out AltosMapView into separate file
This lets us use the regular layout configuration bits in the .xml
file instead of needing to patch the map object into the display. That
was causing problems when re-entering the map tab as the map view
would somehow end up with a zero width.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosdroid/res')
| -rw-r--r-- | altosdroid/res/layout/tab_map_offline.xml | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/altosdroid/res/layout/tab_map_offline.xml b/altosdroid/res/layout/tab_map_offline.xml new file mode 100644 index 00000000..e6f134d8 --- /dev/null +++ b/altosdroid/res/layout/tab_map_offline.xml @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright © 2013 Mike Beattie <mike@ethernal.org> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" > + + <org.altusmetrum.AltosDroid.AltosMapView android:id="@+id/map_view_offline" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + /> + + <LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:baselineAligned="true" + android:orientation="horizontal" > + + <RelativeLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="5dp" > + + <TextView + android:id="@+id/distance_label_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingRight="4dp" + android:text="@string/distance_label" /> + + <TextView + android:id="@+id/distance_value_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/distance_label_offline" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + + <RelativeLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="5dp" > + + <TextView + android:id="@+id/bearing_label_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingRight="4dp" + android:text="@string/bearing_label" /> + + <TextView + android:id="@+id/bearing_value_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/bearing_label_offline" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + + </LinearLayout> + + <LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:baselineAligned="true" + android:orientation="horizontal" > + + <RelativeLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="5dp" > + + <TextView + android:id="@+id/target_lat_label_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingRight="4dp" + android:text="@string/target_latitude_label" /> + + <TextView + android:id="@+id/target_lat_value_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/target_lat_label_offline" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + + <RelativeLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="5dp" > + + <TextView + android:id="@+id/target_lon_label_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingRight="4dp" + android:text="@string/target_longitude_label" /> + + <TextView + android:id="@+id/target_lon_value_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/target_lon_label_offline" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + </LinearLayout> + + <LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:baselineAligned="true" + android:orientation="horizontal" > + + <RelativeLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="5dp" > + + <TextView + android:id="@+id/receiver_lat_label_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingRight="4dp" + android:text="@string/receiver_latitude_label" /> + + <TextView + android:id="@+id/receiver_lat_value_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/receiver_lat_label_offline" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + + <RelativeLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="5dp" > + + <TextView + android:id="@+id/receiver_lon_label_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingRight="4dp" + android:text="@string/receiver_longitude_label" /> + + <TextView + android:id="@+id/receiver_lon_value_offline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/receiver_lon_label_offline" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </RelativeLayout> + </LinearLayout> +</LinearLayout> |
