aboutsummaryrefslogtreecommitdiffstats
path: root/main/res
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-10-20 14:32:06 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-10-20 14:32:06 +0200
commiteb1e528c635888baab7f42b456dd12e57170c4e5 (patch)
tree8d1f8fa94ce70a6b9959d84a62b550606885fa27 /main/res
parentddaa662b5f2d7bf6cbe8dae5b8854097ce4f1cce (diff)
downloadcgeo-eb1e528c635888baab7f42b456dd12e57170c4e5.zip
cgeo-eb1e528c635888baab7f42b456dd12e57170c4e5.tar.gz
cgeo-eb1e528c635888baab7f42b456dd12e57170c4e5.tar.bz2
refactoring: convert waypoints to real list
Diffstat (limited to 'main/res')
-rw-r--r--main/res/layout/cachedetail_waypoints_footer.xml9
-rw-r--r--main/res/layout/cachedetail_waypoints_page.xml36
-rw-r--r--main/res/layout/waypoint_item.xml11
3 files changed, 32 insertions, 24 deletions
diff --git a/main/res/layout/cachedetail_waypoints_footer.xml b/main/res/layout/cachedetail_waypoints_footer.xml
new file mode 100644
index 0000000..58187c1
--- /dev/null
+++ b/main/res/layout/cachedetail_waypoints_footer.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Button xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/add_waypoint"
+ style="@style/button_full"
+ android:layout_margin="10dip"
+ android:padding="10dip"
+ android:clickable="true"
+ android:text="@string/cache_waypoints_add" />
+
diff --git a/main/res/layout/cachedetail_waypoints_page.xml b/main/res/layout/cachedetail_waypoints_page.xml
index 8a24aa8..a3e43df 100644
--- a/main/res/layout/cachedetail_waypoints_page.xml
+++ b/main/res/layout/cachedetail_waypoints_page.xml
@@ -1,26 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="4dip" >
-
- <LinearLayout
- android:id="@+id/waypoints"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
- </LinearLayout>
-
- <Button
- android:id="@+id/add_waypoint"
- style="@style/button_full"
- android:layout_marginTop="9dp"
- android:text="@string/cache_waypoints_add" />
- </LinearLayout>
-
-</ScrollView> \ No newline at end of file
+ android:layout_height="fill_parent"
+ android:cacheColorHint="?background_color"
+ android:divider="?background_color"
+ android:fastScrollEnabled="true"
+ android:focusable="false"
+ android:footerDividersEnabled="false"
+ android:headerDividersEnabled="false"
+ android:clickable="true"
+ android:listSelector="?background_color" >
+
+</ListView> \ No newline at end of file
diff --git a/main/res/layout/waypoint_item.xml b/main/res/layout/waypoint_item.xml
index 17690ff..4fe3576 100644
--- a/main/res/layout/waypoint_item.xml
+++ b/main/res/layout/waypoint_item.xml
@@ -1,25 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/waypoint"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:clickable="true"
+ android:descendantFocusability="blocksDescendants"
+ android:longClickable="true"
android:orientation="vertical"
android:paddingTop="9dp" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
+ android:descendantFocusability="blocksDescendants"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
+ android:descendantFocusability="blocksDescendants"
android:orientation="vertical" >
<TextView
android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:focusable="false"
android:textColor="?text_color"
android:textSize="18sp" />
@@ -30,6 +37,7 @@
android:layout_gravity="left"
android:layout_marginLeft="12dp"
android:ellipsize="marquee"
+ android:focusable="false"
android:lines="1"
android:scrollHorizontally="true"
android:singleLine="true"
@@ -44,6 +52,7 @@
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:clickable="true"
+ android:focusable="false"
android:longClickable="true"
android:src="?actionbar_compass" />
</RelativeLayout>
@@ -55,6 +64,7 @@
android:layout_gravity="left"
android:layout_marginLeft="12dp"
android:ellipsize="marquee"
+ android:focusable="false"
android:lines="1"
android:scrollHorizontally="true"
android:singleLine="true"
@@ -67,6 +77,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
+ android:focusable="false"
android:textColor="?text_color"
android:textSize="14sp"
android:visibility="gone" />