aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable/mark_green_red.xml8
-rw-r--r--res/layout/cache.xml11
-rw-r--r--src/cgeo/geocaching/cgCacheListAdapter.java18
-rw-r--r--src/cgeo/geocaching/cgCacheView.java3
4 files changed, 18 insertions, 22 deletions
diff --git a/res/drawable/mark_green_red.xml b/res/drawable/mark_green_red.xml
new file mode 100644
index 0000000..5983e50
--- /dev/null
+++ b/res/drawable/mark_green_red.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:startColor="#FF770000"
+ android:endColor="#FF009900"
+ android:angle="90" />
+</shape>
diff --git a/res/layout/cache.xml b/res/layout/cache.xml
index 6c7de6b..45703fb 100644
--- a/res/layout/cache.xml
+++ b/res/layout/cache.xml
@@ -25,22 +25,13 @@
android:paddingBottom="7dip"
android:paddingTop="7dip"
android:background="?background_color" >
- <ImageView android:id="@+id/found_mark"
- android:visibility="gone"
+ <ImageView android:id="@+id/log_status_mark"
android:layout_width="2dip"
android:layout_height="30dip"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:scaleType="fitXY"
android:src="@drawable/mark_green" />
- <ImageView android:id="@+id/offline_mark"
- android:visibility="gone"
- android:layout_width="4dip"
- android:layout_height="30dip"
- android:layout_centerVertical="true"
- android:layout_alignParentLeft="true"
- android:scaleType="fitXY"
- android:src="@drawable/mark_red" />
<TextView android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
diff --git a/src/cgeo/geocaching/cgCacheListAdapter.java b/src/cgeo/geocaching/cgCacheListAdapter.java
index 7070386..5780889 100644
--- a/src/cgeo/geocaching/cgCacheListAdapter.java
+++ b/src/cgeo/geocaching/cgCacheListAdapter.java
@@ -369,8 +369,7 @@ public class cgCacheListAdapter extends ArrayAdapter<cgCache> {
holder.checkbox = (CheckBox) rowView.findViewById(R.id.checkbox);
holder.oneInfo = (RelativeLayout) rowView.findViewById(R.id.one_info);
holder.oneCheckbox = (RelativeLayout) rowView.findViewById(R.id.one_checkbox);
- holder.foundMark = (ImageView) rowView.findViewById(R.id.found_mark);
- holder.offlineMark = (ImageView) rowView.findViewById(R.id.offline_mark);
+ holder.logStatusMark = (ImageView) rowView.findViewById(R.id.log_status_mark);
holder.oneCache = (RelativeLayout) rowView.findViewById(R.id.one_cache);
holder.text = (TextView) rowView.findViewById(R.id.text);
holder.directionLayout = (RelativeLayout) rowView.findViewById(R.id.direction_layout);
@@ -444,15 +443,14 @@ public class cgCacheListAdapter extends ArrayAdapter<cgCache> {
}
holder.direction.setContent(cache.latitude, cache.longitude);
- if (cache.logOffline) {
- holder.offlineMark.setVisibility(View.VISIBLE);
- holder.foundMark.setVisibility(View.GONE);
+ if (cache.found && cache.logOffline) {
+ holder.logStatusMark.setImageResource(R.drawable.mark_green_red);
} else if (cache.found) {
- holder.offlineMark.setVisibility(View.GONE);
- holder.foundMark.setVisibility(View.VISIBLE);
- } else {
- holder.offlineMark.setVisibility(View.GONE);
- holder.foundMark.setVisibility(View.GONE);
+ holder.logStatusMark.setImageResource(R.drawable.mark_green);
+ } else if (cache.logOffline) {
+ holder.logStatusMark.setImageResource(R.drawable.mark_red);
+ } else {
+ holder.logStatusMark.setVisibility(View.GONE);
}
if (cache.nameSp == null) {
diff --git a/src/cgeo/geocaching/cgCacheView.java b/src/cgeo/geocaching/cgCacheView.java
index 6705729..08c9d17 100644
--- a/src/cgeo/geocaching/cgCacheView.java
+++ b/src/cgeo/geocaching/cgCacheView.java
@@ -11,8 +11,7 @@ public class cgCacheView {
public RelativeLayout oneInfo;
public RelativeLayout oneCheckbox;
public CheckBox checkbox;
- public ImageView foundMark;
- public ImageView offlineMark;
+ public ImageView logStatusMark;
public TextView text;
public TextView favourite;
public TextView info;