summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/dimens.xml2
-rw-r--r--src/com/android/launcher3/popup/ArrowPopup.java3
-rw-r--r--src/com/android/launcher3/util/Themes.java13
3 files changed, 15 insertions, 3 deletions
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 7822e0547..7804133bb 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -37,8 +37,6 @@
<dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>
<!-- Hotseat/all-apps scrim -->
- <dimen name="all_apps_scrim_radius">8dp</dimen>
- <dimen name="all_apps_scrim_margin">8dp</dimen>
<dimen name="all_apps_scrim_blur">4dp</dimen>
<dimen name="vertical_drag_handle_size">24dp</dimen>
<dimen name="vertical_drag_handle_overlap_workspace">0dp</dimen>
diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java
index 0d499c1ff..a229207d3 100644
--- a/src/com/android/launcher3/popup/ArrowPopup.java
+++ b/src/com/android/launcher3/popup/ArrowPopup.java
@@ -82,7 +82,8 @@ public abstract class ArrowPopup extends AbstractFloatingView {
public ArrowPopup(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mInflater = LayoutInflater.from(context);
- mOutlineRadius = getResources().getDimension(R.dimen.bg_round_rect_radius);
+ mOutlineRadius = Themes.getDialogCornerRadius(context,
+ getResources().getDimension(R.dimen.bg_round_rect_radius));
mLauncher = Launcher.getLauncher(context);
mIsRtl = Utilities.isRtl(getResources());
diff --git a/src/com/android/launcher3/util/Themes.java b/src/com/android/launcher3/util/Themes.java
index 675e2f4b7..17b7e8d67 100644
--- a/src/com/android/launcher3/util/Themes.java
+++ b/src/com/android/launcher3/util/Themes.java
@@ -25,11 +25,24 @@ import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.TypedValue;
+import com.android.launcher3.R;
+
/**
* Various utility methods associated with theming.
*/
public class Themes {
+ public static float getDialogCornerRadius(Context context, float defaultValue) {
+ return getDimension(context, android.R.attr.dialogCornerRadius, defaultValue);
+ }
+
+ public static float getDimension(Context context, int attr, float defaultValue) {
+ TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+ float value = ta.getDimension(0, defaultValue);
+ ta.recycle();
+ return value;
+ }
+
public static int getColorAccent(Context context) {
return getAttrColor(context, android.R.attr.colorAccent);
}