diff options
31 files changed, 21 insertions, 2 deletions
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java index 4a629bb..ac3ca55 100644 --- a/core/java/android/app/AlertDialog.java +++ b/core/java/android/app/AlertDialog.java @@ -28,6 +28,7 @@ import android.util.Log; import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.KeyEvent; +import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.widget.AdapterView; @@ -81,6 +82,24 @@ public class AlertDialog extends Dialog implements DialogInterface { return outValue.resourceId; } + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mCancelable) { + final View decor = mWindow.getDecorView(); + final int width = decor.getWidth(); + final int height = decor.getHeight(); + final float x = ev.getX(); + final float y = ev.getY(); + + if (mCancelable && (x < 0 || x > width || y < 0 || y > height)) { + cancel(); + return true; + } + } + + return super.onTouchEvent(ev); + } + /** * Gets one of the buttons used in the dialog. * <p> diff --git a/core/java/android/widget/ButtonGroup.java b/core/java/android/widget/ButtonGroup.java index a9463ff..ce3decb 100644 --- a/core/java/android/widget/ButtonGroup.java +++ b/core/java/android/widget/ButtonGroup.java @@ -125,7 +125,7 @@ public class ButtonGroup extends LinearLayout { @Override public void addView(View child, int index, ViewGroup.LayoutParams params) { - if (mButtonBackgroundRes != 0) { + if (child instanceof Button && mButtonBackgroundRes != 0) { // Preserve original padding as we change the background final int paddingLeft = child.getPaddingLeft(); final int paddingRight = child.getPaddingRight(); diff --git a/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png Binary files differindex 83c0852..bbfb9f7 100644 --- a/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png Binary files differindex c495216..af69ee5 100644 --- a/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png +++ b/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png Binary files differindex 620adaa..59b9b13 100644 --- a/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png Binary files differindex b03d6cd..e1ec9dc 100644 --- a/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png +++ b/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png Binary files differindex 785ae6e..0b67f24 100644 --- a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png Binary files differindex d96787b..107ffe4 100644 --- a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png Binary files differindex d042a81..2711284 100644 --- a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png +++ b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png Binary files differindex 677cf3d..1aca4b7 100644 --- a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png +++ b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png Binary files differindex 9b13c5b..9e06c00 100644 --- a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png Binary files differindex 8e245fc..f032510 100644 --- a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png +++ b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png Binary files differindex cffae3e..a9f85ea 100644 --- a/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png Binary files differindex 0394885..c4c4652 100644 --- a/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png +++ b/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png Binary files differindex 6746ce8..32c2cb4 100644 --- a/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png Binary files differindex bdcdc71..7a8fb0e 100644 --- a/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png +++ b/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png Binary files differindex e3a30a9..1e2d327 100644 --- a/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png Binary files differindex f7f344a..ac2d7a3 100644 --- a/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png +++ b/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png Binary files differindex 26bf28a..9d93403 100644 --- a/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png Binary files differindex 0edfe85..1c08e6a 100644 --- a/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png +++ b/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png Binary files differindex 4f08fb4..cc5f4f4 100644 --- a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png Binary files differindex cc535bd..51b4e4d 100644 --- a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png Binary files differindex 9d3e5b9..503db7c 100644 --- a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png +++ b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png Binary files differindex 74aff55..6a2fb5e 100644 --- a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png +++ b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png Binary files differindex c7f7699..3463b66 100644 --- a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png Binary files differindex a10f9a6..55dedc6 100644 --- a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png Binary files differindex 51e7ec3..741b8dc 100644 --- a/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png Binary files differindex c4b70625a..0854fe5 100644 --- a/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png +++ b/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png Binary files differindex 7f97eae..43c0050 100644 --- a/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png Binary files differindex 341bb4b..bc5fc92 100644 --- a/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png +++ b/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index 06c502b..d7954a7 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -89,7 +89,7 @@ <item name="buttonStyleToggle">@android:style/Widget.Button.Toggle</item> - <item name="groupButtonBackground">@android:drawable/btn_default</item> + <item name="groupButtonBackground">@null</item> <!-- List attributes --> <item name="listPreferredItemHeight">64dip</item> |