Added dynamic themes for slecting holo were avaiable

fixed the button bars in the map fragment, and parking timer to use
android's button bar styles

Change-Id: I63e1d2a07f6d13964616f23cc3772dd99437bbee
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-04-16 11:21:10 -04:00
parent e5f57674fd
commit 21d43d7f97
6 changed files with 70 additions and 104 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
package="com.TwentyCodes.android.FindMyCarFull"
android:installLocation="auto"
android:versionCode="200"
android:versionName="4.0" >
@@ -27,14 +27,14 @@
<application
android:icon="@drawable/icon"
android:label="@string/app_name" >
android:label="@string/app_name"
android:theme="@style/MyTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name="Main"
android:configChanges="keyboard|keyboardHidden|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:uiOptions="splitActionBarWhenNarrow" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -54,9 +54,7 @@
android:name="com.TwentyCodes.android.FindMyCarLib.ParkingTimerService"
android:process=":parkingtimer" />
<activity
android:name="com.TwentyCodes.android.FindMyCarLib.Settings"
android:theme="@android:style/Theme.Light" />
<activity android:name="com.TwentyCodes.android.FindMyCarLib.Settings" />
<activity
android:name="com.TwentyCodes.android.exception.ExceptionReportActivity"
android:configChanges="keyboard|keyboardHidden|orientation" />
@@ -65,7 +63,7 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.TwentyCodes.android.FindMyCarLib.ParkignTimerActivity"
android:theme="@android:style/Theme.Dialog" />
android:theme="@style/MyDialogTheme" />
<service android:name="com.TwentyCodes.android.exception.ReportPostingService" />
</application>

View File

@@ -1,94 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/distance_background"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="10dip"
android:paddingTop="10dip" >
<com.TwentyCodes.android.FindMyCarLib.UI.DelegatedImageButton
<ImageButton
android:id="@+id/my_location"
android:layout_width="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/my_location_action_bar"
android:layout_weight="1"
android:contentDescription="@string/my_location"
android:duplicateParentState="true" />
</RelativeLayout>
android:src="@drawable/my_location_action_bar" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="10dip"
android:paddingTop="10dip" >
<com.TwentyCodes.android.FindMyCarLib.UI.DelegatedImageButton
<ImageButton
android:id="@+id/mark_my_location"
android:layout_width="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/mark_my_location_action_bar"
android:layout_weight="1"
android:contentDescription="@string/mark_car"
android:duplicateParentState="true" />
</RelativeLayout>
android:src="@drawable/mark_my_location_action_bar" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="10dip"
android:paddingTop="10dip" >
<com.TwentyCodes.android.FindMyCarLib.UI.DelegatedImageButton
<ImageButton
android:id="@+id/show_both"
android:layout_width="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:background="@drawable/car_action_bar"
android:duplicateParentState="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="10dip"
android:paddingTop="10dip" >
android:contentDescription="@string/show_both"
android:src="@drawable/car_action_bar" />
<com.TwentyCodes.android.FindMyCarLib.UI.DelegatedImageButton
<ImageButton
android:id="@+id/parking_timer"
android:layout_width="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/time_action_bar"
android:contentDescription="@string/parking_timer"
android:duplicateParentState="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="10dip"
android:paddingTop="10dip" >
android:contentDescription="@string/parking_timer"
android:src="@drawable/time_action_bar" />
<com.TwentyCodes.android.FindMyCarLib.UI.DelegatedImageButton
<ImageButton
android:id="@+id/directions"
android:layout_width="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/nav_action_bar"
android:layout_weight="1"
android:contentDescription="@string/directions"
android:duplicateParentState="true" />
</RelativeLayout>
android:src="@drawable/nav_action_bar" />
</LinearLayout>

View File

@@ -102,31 +102,28 @@
<LinearLayout
android:id="@+id/llButtons"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/notiyfyme"
android:layout_marginTop="10dip"
android:background="@drawable/distance_background"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="@+id/btSetTimer"
android:layout_width="130dip"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="@string/setTimer"
android:textSize="14dip" />
android:text="@string/setTimer" />
<Button
android:id="@+id/btRemoveTimer"
android:layout_width="130dip"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="@string/removeTimer"
android:textSize="14dip" />
android:text="@string/removeTimer" />
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Any customizations for your app running on devices with Theme.Holo here -->
<style name="MyTheme" parent="@android:style/Theme.Holo.Light.NoActionBar"></style>
<style name="MyDialogTheme" parent="@android:style/Theme.Holo.Dialog"></style>
</resources>

View File

@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyTheme" parent="@android:style/Theme">
<!-- Any customizations for your app running on pre-3.0 devices here -->
</style>
<style name="MyTheme" parent="@android:style/Theme.Light.NoTitleBar"></style>
<style name="MyDialogTheme" parent="@android:style/Theme.Dialog"></style>
</resources>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
package="com.TwentyCodes.android.FindMyCarLite"
android:installLocation="auto"
android:versionCode="200"
android:versionName="4.0" >
@@ -27,14 +27,14 @@
<application
android:icon="@drawable/icon"
android:label="@string/app_name" >
android:label="@string/app_name"
android:theme="@style/MyTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name="FindMyCar"
android:configChanges="keyboard|keyboardHidden|orientation"
android:label="@string/app_name_lite"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:uiOptions="splitActionBarWhenNarrow" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -54,9 +54,7 @@
android:name="com.TwentyCodes.android.FindMyCarLib.ParkingTimerService"
android:process=":parkingtimer" />
<activity
android:name="com.TwentyCodes.android.FindMyCarLib.Settings"
android:theme="@android:style/Theme.Light" />
<activity android:name="com.TwentyCodes.android.FindMyCarLib.Settings" />
<activity
android:name="com.TwentyCodes.android.exception.ExceptionReportActivity"
android:configChanges="keyboard|keyboardHidden|orientation" />
@@ -65,7 +63,7 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.TwentyCodes.android.FindMyCarLib.ParkignTimerActivity"
android:theme="@android:style/Theme.Dialog" />
android:theme="@style/MyDialogTheme" />
<service android:name="com.TwentyCodes.android.exception.ReportPostingService" />
</application>