Cleaned up UI xml

and fixed some lint issues

Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-03-08 09:18:38 -05:00
parent 3e77944ea5
commit b083efed28
8 changed files with 195 additions and 183 deletions

Binary file not shown.

View File

@@ -236,48 +236,47 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static int user_arrow_animation_3=0x7f02001f;
}
public static final class id {
public static int TextView01=0x7f070009;
public static int TextView02=0x7f07000a;
public static int ad=0x7f07000b;
public static int btRemoveTimer=0x7f070023;
public static int btSetTimer=0x7f070022;
public static int buttons=0x7f070011;
public static int chNotify=0x7f07001d;
public static int delete_car=0x7f070029;
public static int description=0x7f070006;
public static int directions=0x7f070016;
public static int distance_background=0x7f070027;
public static int editText=0x7f070019;
public static int etNotify=0x7f07001f;
public static int exception_text=0x7f070008;
public static int exception_title=0x7f070007;
public static int indicator=0x7f07000c;
public static int llButtons=0x7f070021;
public static int map_fragment=0x7f07000f;
public static int map_mode=0x7f070028;
public static int mapview=0x7f070017;
public static int mark_my_location=0x7f070013;
public static int my_location=0x7f070012;
public static int TextView01=0x7f070008;
public static int TextView02=0x7f070009;
public static int ad=0x7f07000a;
public static int btRemoveTimer=0x7f070022;
public static int btSetTimer=0x7f070021;
public static int buttons=0x7f07000f;
public static int chNotify=0x7f07001c;
public static int delete_car=0x7f070028;
public static int description=0x7f070005;
public static int directions=0x7f070015;
public static int distance_background=0x7f070026;
public static int distancebar=0x7f07000d;
public static int editText=0x7f070018;
public static int etNotify=0x7f07001e;
public static int exception_text=0x7f070007;
public static int exception_title=0x7f070006;
public static int indicator=0x7f07000b;
public static int llButtons=0x7f070020;
public static int map_fragment=0x7f07000e;
public static int map_mode=0x7f070027;
public static int mapview=0x7f070016;
public static int mark_my_location=0x7f070012;
public static int my_location=0x7f070011;
public static int none=0x7f070000;
public static int notiyfyme=0x7f07001c;
public static int pager=0x7f07000d;
public static int parking_timer=0x7f070015;
public static int pickerlayout=0x7f07001a;
public static int send=0x7f070005;
public static int settings=0x7f07002a;
public static int show_both=0x7f070014;
public static int skyhook_img=0x7f070024;
public static int table=0x7f07000e;
public static int tc_img=0x7f070026;
public static int text=0x7f070025;
public static int tpParkingTimerTimePicker=0x7f07001b;
public static int notiyfyme=0x7f07001b;
public static int pager=0x7f07000c;
public static int parking_timer=0x7f070014;
public static int pickerlayout=0x7f070019;
public static int send=0x7f070004;
public static int settings=0x7f070029;
public static int show_both=0x7f070013;
public static int skyhook_img=0x7f070023;
public static int tc_img=0x7f070025;
public static int text=0x7f070024;
public static int tpParkingTimerTimePicker=0x7f07001a;
public static int triangle=0x7f070001;
public static int tvAccuracy2=0x7f070010;
public static int tvAddress=0x7f070018;
public static int tvBefore=0x7f070020;
public static int tvAccuracy=0x7f070010;
public static int tvAddress=0x7f070017;
public static int tvBefore=0x7f07001f;
public static int tvDistance=0x7f070003;
public static int tvDistance2=0x7f070004;
public static int tvNotify1=0x7f07001e;
public static int tvNotify1=0x7f07001d;
public static int underline=0x7f070002;
}
public static final class integer {
@@ -404,6 +403,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static int stay_awake_off=0x7f05001d;
public static int stay_awake_on=0x7f05001c;
public static int stay_awake_pref=0x7f05000e;
public static int store_your_notes_here=0x7f050077;
public static int the_vaule_was_not_a_number_update_interval_60=0x7f050053;
public static int timer_already_set=0x7f050040;
public static int timer_canceled=0x7f05004b;

View File

@@ -236,48 +236,47 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static int user_arrow_animation_3=0x7f02001f;
}
public static final class id {
public static int TextView01=0x7f070009;
public static int TextView02=0x7f07000a;
public static int ad=0x7f07000b;
public static int btRemoveTimer=0x7f070023;
public static int btSetTimer=0x7f070022;
public static int buttons=0x7f070011;
public static int chNotify=0x7f07001d;
public static int delete_car=0x7f070029;
public static int description=0x7f070006;
public static int directions=0x7f070016;
public static int distance_background=0x7f070027;
public static int editText=0x7f070019;
public static int etNotify=0x7f07001f;
public static int exception_text=0x7f070008;
public static int exception_title=0x7f070007;
public static int indicator=0x7f07000c;
public static int llButtons=0x7f070021;
public static int map_fragment=0x7f07000f;
public static int map_mode=0x7f070028;
public static int mapview=0x7f070017;
public static int mark_my_location=0x7f070013;
public static int my_location=0x7f070012;
public static int TextView01=0x7f070008;
public static int TextView02=0x7f070009;
public static int ad=0x7f07000a;
public static int btRemoveTimer=0x7f070022;
public static int btSetTimer=0x7f070021;
public static int buttons=0x7f07000f;
public static int chNotify=0x7f07001c;
public static int delete_car=0x7f070028;
public static int description=0x7f070005;
public static int directions=0x7f070015;
public static int distance_background=0x7f070026;
public static int distancebar=0x7f07000d;
public static int editText=0x7f070018;
public static int etNotify=0x7f07001e;
public static int exception_text=0x7f070007;
public static int exception_title=0x7f070006;
public static int indicator=0x7f07000b;
public static int llButtons=0x7f070020;
public static int map_fragment=0x7f07000e;
public static int map_mode=0x7f070027;
public static int mapview=0x7f070016;
public static int mark_my_location=0x7f070012;
public static int my_location=0x7f070011;
public static int none=0x7f070000;
public static int notiyfyme=0x7f07001c;
public static int pager=0x7f07000d;
public static int parking_timer=0x7f070015;
public static int pickerlayout=0x7f07001a;
public static int send=0x7f070005;
public static int settings=0x7f07002a;
public static int show_both=0x7f070014;
public static int skyhook_img=0x7f070024;
public static int table=0x7f07000e;
public static int tc_img=0x7f070026;
public static int text=0x7f070025;
public static int tpParkingTimerTimePicker=0x7f07001b;
public static int notiyfyme=0x7f07001b;
public static int pager=0x7f07000c;
public static int parking_timer=0x7f070014;
public static int pickerlayout=0x7f070019;
public static int send=0x7f070004;
public static int settings=0x7f070029;
public static int show_both=0x7f070013;
public static int skyhook_img=0x7f070023;
public static int tc_img=0x7f070025;
public static int text=0x7f070024;
public static int tpParkingTimerTimePicker=0x7f07001a;
public static int triangle=0x7f070001;
public static int tvAccuracy2=0x7f070010;
public static int tvAddress=0x7f070018;
public static int tvBefore=0x7f070020;
public static int tvAccuracy=0x7f070010;
public static int tvAddress=0x7f070017;
public static int tvBefore=0x7f07001f;
public static int tvDistance=0x7f070003;
public static int tvDistance2=0x7f070004;
public static int tvNotify1=0x7f07001e;
public static int tvNotify1=0x7f07001d;
public static int underline=0x7f070002;
}
public static final class integer {
@@ -404,6 +403,7 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na
public static int stay_awake_off=0x7f05001d;
public static int stay_awake_on=0x7f05001c;
public static int stay_awake_pref=0x7f05000e;
public static int store_your_notes_here=0x7f050077;
public static int the_vaule_was_not_a_number_update_interval_60=0x7f050053;
public static int timer_already_set=0x7f050040;
public static int timer_canceled=0x7f05004b;

View File

@@ -15,15 +15,15 @@
-keep public class com.android.vending.licensing.ILicensingService
-keep public class * extends android.preference.Preference
-keepclasseswithmembernames class * {
-keepclasseswithmembers class * {
native <methods>;
}
-keepclasseswithmembernames class * {
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

View File

@@ -1,50 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/distance_background"
android:stretchColumns="0" >
android:background="@drawable/distance_background" >
<!-- distance display -->
<TextView
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="left"
android:text="@string/distance"
android:textColor="#000000"
android:textSize="22sp"
android:textStyle="bold" />
<TableRow android:layout_marginBottom="2dip" >
<TextView
android:id="@+id/tvDistance"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_marginRight="3dip"
android:layout_weight="1"
android:gravity="right"
android:textColor="#000000"
android:textSize="26sp" />
<TextView
android:id="@+id/tvDistance"
android:layout_column="0"
android:gravity="left"
android:text="@string/distance"
android:textColor="#000000"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tvDistance2"
android:layout_column="1"
android:layout_marginRight="3dip"
android:gravity="right"
android:text="0"
android:textColor="#000000"
android:textSize="26sp" />
</TableRow>
<!-- accuracy display -->
<!-- <TableRow android:background="#505050"> -->
<!-- <TextView android:layout_column="0" -->
<!-- android:id="@+id/tvAccuracy" -->
<!-- android:text="@string/gps_accuracy" -->
<!-- android:enabled="false" -->
<!-- android:textSize="22sp" -->
<!-- android:gravity="left" -->
<!-- android:textColor="#FFFFFF" -->
<!-- android:textStyle="bold"/> -->
<!-- <TextView android:layout_column="1" -->
<!-- android:id="@+id/tvAccuracy2" -->
<!-- android:gravity="right" -->
<!-- android:text="0" -->
<!-- android:enabled="false" -->
<!-- android:textColor="#FFFFFF" -->
<!-- android:textSize="26sp"/> -->
<!-- </TableRow> -->
</TableLayout>
</LinearLayout>

View File

@@ -1,39 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#505050"
android:orientation="vertical" >
android:layout_width="match_parent"
android:layout_height="match_parent" >
<include
android:id="@+id/table"
android:id="@+id/distancebar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
layout="@layout/distancebar" />
layout="@layout/distancebar" >
</include>
<fragment
android:id="@+id/map_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/buttons"
android:layout_below="@id/distancebar"
class="com.TwentyCodes.android.fragments.SkyHoookUserOverlayMapFragment" >
<!-- Preview: layout=@layout/map_fragment -->
</fragment>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/map_fragment"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/table" />
<TextView
android:id="@+id/tvAccuracy2"
android:id="@+id/tvAccuracy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/table"
android:layout_below="@id/distancebar"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:enabled="false"
@@ -42,7 +34,7 @@
android:textStyle="bold" />
<include
android:id="@+id/buttons"
android:id="@id/buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"

View File

@@ -5,49 +5,89 @@
android:background="@drawable/distance_background"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/my_location"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginTop="10dip"
android:layout_weight="1"
android:contentDescription="@string/my_location"
android:src="@drawable/my_location_action_bar" />
android:orientation="vertical" >
<ImageButton
android:id="@+id/mark_my_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:contentDescription="@string/mark_car"
android:src="@drawable/mark_my_location_action_bar" />
<ImageButton
android:id="@+id/my_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/my_location_action_bar"
android:contentDescription="@string/my_location" />
</RelativeLayout>
<ImageButton
android:id="@+id/show_both"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginTop="10dip"
android:layout_weight="1"
android:contentDescription="@string/show_both"
android:src="@drawable/car_action_bar" />
android:orientation="vertical" >
<ImageButton
android:id="@+id/parking_timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:contentDescription="@string/parking_timer"
android:src="@drawable/time_action_bar" />
<ImageButton
android:id="@+id/mark_my_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/mark_my_location_action_bar"
android:contentDescription="@string/mark_car" />
</RelativeLayout>
<ImageButton
android:id="@+id/directions"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginTop="10dip"
android:layout_weight="1"
android:contentDescription="@string/directions"
android:src="@drawable/nav_action_bar" />
android:orientation="vertical" >
<ImageButton
android:id="@+id/show_both"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:background="@drawable/car_action_bar" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginTop="10dip"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/parking_timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/time_action_bar"
android:contentDescription="@string/parking_timer" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginTop="10dip"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/directions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/nav_action_bar"
android:contentDescription="@string/directions" />
</RelativeLayout>
</LinearLayout>

View File

@@ -41,7 +41,6 @@ import com.TwentyCodes.android.FindMyCarLib.UI.FindMyCarOverlay;
import com.TwentyCodes.android.fragments.SkyHoookUserOverlayMapFragment;
import com.TwentyCodes.android.location.GeoPointLocationListener;
import com.TwentyCodes.android.location.GeoUtils;
import com.TwentyCodes.android.location.MapView;
import com.TwentyCodes.android.location.MidPoint;
import com.TwentyCodes.android.overlays.DirectionsOverlay;
import com.TwentyCodes.android.overlays.DirectionsOverlay.OnDirectionsCompleteListener;
@@ -161,9 +160,9 @@ public class MapFragment extends Fragment implements GeoPointLocationListener, O
return true;
}
public MapView getMap() {
return mMap.getMap();
}
// public MapView getMap() {
// return mMap.getMap();
// }
/**
* loads saved settings from files
@@ -287,10 +286,11 @@ public class MapFragment extends Fragment implements GeoPointLocationListener, O
View view = inflater.inflate(R.layout.map, container, false);
mMap = (SkyHoookUserOverlayMapFragment) getFragmentManager().findFragmentById(R.id.map_fragment);
mMap.setGeoPointLocationListener(this);
setUiHandler();
mAccuracy = (TextView) view.findViewById(R.id.tvAccuracy2);
mDistance = (TextView) view.findViewById(R.id.tvDistance2);
mAccuracy = (TextView) view.findViewById(R.id.tvAccuracy);
mDistance = (TextView) view.findViewById(R.id.tvDistance);
mSettings = getActivity().getSharedPreferences(Settings.SETTINGS, Context.MODE_WORLD_WRITEABLE);
view.findViewById(R.id.my_location).setOnClickListener(this);
@@ -329,11 +329,14 @@ public class MapFragment extends Fragment implements GeoPointLocationListener, O
mHandler.post(new Runnable() {
@Override
public void run() {
// mAccuracy.setText(GeoUtils.distanceToString((accuracy / 1E3), isMetric));
mHandler.sendMessage(mHandler.obtainMessage(ACCURACY, GeoUtils.distanceToString((accuracy / 1E3), isMetric)));
if (mCarPoint != null && point != null) {
double distance = GeoUtils.distanceKm(point, mCarPoint);
mHandler.sendMessage(mHandler.obtainMessage(DISTANCE, GeoUtils.distanceToString(distance, isMetric)));
// mDistance.setText(GeoUtils.distanceToString(distance, isMetric));
// value is set in KM. if user has gone 30 feet from car app
// is set to check for arrival