Improve alert dialog theme

This commit is contained in:
Jimmy Shih
2013-11-21 13:37:05 -08:00
parent 41f5206c63
commit b90d3193ab
7 changed files with 26 additions and 16 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ limitations under the License.
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher_my_tracks"
android:label="@string/my_tracks_app_name"
android:theme="@style/MyTracks" >
android:theme="@style/ThemeMyTracks" >
<!-- For data backup -->
<meta-data
android:name="com.google.android.backup.api_key"
+1 -1
View File
@@ -19,7 +19,7 @@ limitations under the License.
android:layout_height="match_parent"
android:layout_width="match_parent" >
<TextView
android:background="@color/warning_background"
android:background="@color/holo_orange_dark"
android:drawableLeft="@drawable/ic_warning"
android:gravity="left|center_vertical"
android:id="@+id/map_message"
+1 -1
View File
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="ActionBarStyle.MyTracks" parent="@android:style/Widget.Holo.ActionBar">
<style name="ActionBarStyleMyTracks" parent="@android:style/Widget.Holo.ActionBar">
<!-- Same image as the source except using a grey line instead of a blue line -->
<item name="android:background">@drawable/ab_transparent_dark_holo</item>
</style>
+14 -5
View File
@@ -15,16 +15,25 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MyTracks" parent="android:Theme.Holo">
<style name="ThemeMyTracks" parent="android:Theme.Holo">
<!-- Auto generated -->
<item name="android:editTextBackground">@drawable/edit_text_holo_dark</item>
<item name="android:activatedBackgroundIndicator">@drawable/activated_background_holo_dark</item>
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewMyTracks</item>
<item name="android:editTextBackground">@drawable/edit_text_holo_dark</item>
<item name="android:listChoiceBackgroundIndicator">@drawable/list_selector_holo_dark</item>
<item name="android:listChoiceIndicatorMultiple">@drawable/btn_check_holo_dark</item>
<item name="android:progressBarStyleHorizontal">@style/ProgressBarMyTracks</item>
<item name="android:listChoiceBackgroundIndicator">@drawable/list_selector_holo_dark</item>
<item name="android:activatedBackgroundIndicator">@drawable/activated_background_holo_dark</item>
<!-- Manually added -->
<item name="android:actionBarStyle">@style/ActionBarStyle.MyTracks</item>
<item name="android:actionBarStyle">@style/ActionBarStyleMyTracks</item>
<item name="android:actionModeBackground">@drawable/action_mode_background_mytracks</item>
<item name="android:alertDialogTheme">@style/AlertDialogThemeMyTracks</item>
</style>
<style name="AlertDialogThemeMyTracks" parent="@android:style/Theme.Holo.Dialog">
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewMyTracks</item>
<item name="android:textColor">@color/holo_orange_dark</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
</style>
</resources>
+5 -4
View File
@@ -27,15 +27,16 @@ limitations under the License.
<color name="chart_power_fill">#40401465</color> <!-- transparent purple -->
<color name="chart_speed_border">#FF0066FF</color> <!-- blue -->
<color name="chart_speed_fill">#40C8E0FF</color> <!-- transparent blue -->
<color name="holo_orange_dark">#FFFF8800</color>
<color name="recording_text">#FFBE161B</color> <!-- red -->
<color name="stats_large_label">#FFFAAD2C</color> <!-- orange -->
<color name="stats_separator">#99999999</color> <!-- light gray -->
<color name="text_gradient_center">#B2000000</color> <!-- black 70% opacity -->
<color name="text_gradient_end">#00000000</color> <!-- black 0% opacity -->
<color name="text_gradient_start">#FF000000</color> <!-- black 100% opacity -->
<color name="recording_text">#FFBE161B</color> <!-- red -->
<color name="stats_large_label">#FFFAAD2C</color> <!-- orange -->
<color name="stats_separator">#99999999</color> <!-- light gray -->
<color name="track_color_fast">#F7DF0101</color> <!-- red color -->
<color name="track_color_normal">#F75858FA</color> <!-- blue color -->
<color name="track_color_slow">#F774DF00</color> <!-- green color -->
<color name="track_controller_background">#FF0E0E0E</color> <!-- dark gray -->
<color name="warning_background">#FFFF8800</color> <!-- orange dark -->
</resources>
+3 -3
View File
@@ -15,14 +15,14 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MyTracks" parent="android:Theme.Black">
<style name="MyTracksTheme" parent="android:Theme.Black">
<!-- Auto generated -->
<item name="android:editTextStyle">@style/EditTextMyTracks</item>
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewMyTracks</item>
<item name="android:editTextStyle">@style/EditTextMyTracks</item>
<item name="android:checkboxStyle">@style/CheckBoxMyTracks</item>
<item name="android:progressBarStyleHorizontal">@style/ProgressBarMyTracks</item>
<item name="android:listViewStyle">@style/ListViewMyTracks</item>
<item name="android:listViewWhiteStyle">@style/ListViewMyTracks.White</item>
<item name="android:progressBarStyleHorizontal">@style/ProgressBarMyTracks</item>
<item name="android:spinnerItemStyle">@style/SpinnerItemMyTracks</item>
</style>
</resources>
@@ -89,7 +89,7 @@ public class DialogUtils {
*/
private static ProgressDialog createProgressDialog(boolean spinner, Context context,
int messageId, DialogInterface.OnCancelListener onCancelListener, Object... formatArgs) {
ProgressDialog progressDialog = new ProgressDialog(context, R.style.MyTracks);
ProgressDialog progressDialog = new ProgressDialog(context, R.style.ThemeMyTracks);
progressDialog.setCancelable(true);
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.setIcon(android.R.drawable.ic_dialog_info);