summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notificationlight
diff options
context:
space:
mode:
authorjrizzoli <joey@cyanogenmoditalia.it>2015-11-16 22:15:32 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-22 06:20:22 -0800
commitb55f89de1e0c8a8631551c02efcc091d0ee07b5d (patch)
tree94d95d5eaf52805019dbdd704e704c04ef75ab85 /src/com/android/settings/notificationlight
parentbd3fe676619443b9060ffaa85abfe8e632e4340c (diff)
downloadpackages_apps_Settings-b55f89de1e0c8a8631551c02efcc091d0ee07b5d.zip
packages_apps_Settings-b55f89de1e0c8a8631551c02efcc091d0ee07b5d.tar.gz
packages_apps_Settings-b55f89de1e0c8a8631551c02efcc091d0ee07b5d.tar.bz2
Settings: update layouts
Settings: update layouts - User materialish oval shapes instead of rectangles - Rearrange notifications, wireless, display and sound entries - Update some strings Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it> Settings: update control ring stream string Signed-off-by: Jorge Ruesga <jorge@ruesga.com> WirelessSettings: Remove NFC category if there's no NFC adapter + Settings: add mobile network entry to dashboard Change-Id: I3fcd758f77a217e5c37a22f4d797398a7613b5a2 Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
Diffstat (limited to 'src/com/android/settings/notificationlight')
-rw-r--r--src/com/android/settings/notificationlight/ApplicationLightPreference.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/com/android/settings/notificationlight/ApplicationLightPreference.java b/src/com/android/settings/notificationlight/ApplicationLightPreference.java
index 8ae4a4a..6bcde9c 100644
--- a/src/com/android/settings/notificationlight/ApplicationLightPreference.java
+++ b/src/com/android/settings/notificationlight/ApplicationLightPreference.java
@@ -22,7 +22,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.graphics.drawable.ShapeDrawable;
-import android.graphics.drawable.shapes.RectShape;
+import android.graphics.drawable.shapes.OvalShape;
import android.os.Bundle;
import android.preference.DialogPreference;
import android.util.AttributeSet;
@@ -132,12 +132,11 @@ public class ApplicationLightPreference extends DialogPreference {
}
private void updatePreferenceViews() {
- final int width = (int) mResources.getDimension(R.dimen.device_memory_usage_button_width);
- final int height = (int) mResources.getDimension(R.dimen.device_memory_usage_button_height);
+ final int size = (int) mResources.getDimension(R.dimen.oval_notification_size);
if (mLightColorView != null) {
mLightColorView.setEnabled(true);
- mLightColorView.setImageDrawable(createRectShape(width, height, 0xFF000000 + mColorValue));
+ mLightColorView.setImageDrawable(createOvalShape(size, 0xFF000000 + mColorValue));
}
if (mOnValueView != null) {
mOnValueView.setText(mapLengthValue(mOnValue));
@@ -246,10 +245,10 @@ public class ApplicationLightPreference extends DialogPreference {
/**
* Utility methods
*/
- private static ShapeDrawable createRectShape(int width, int height, int color) {
- ShapeDrawable shape = new ShapeDrawable(new RectShape());
- shape.setIntrinsicHeight(height);
- shape.setIntrinsicWidth(width);
+ private static ShapeDrawable createOvalShape(int size, int color) {
+ ShapeDrawable shape = new ShapeDrawable(new OvalShape());
+ shape.setIntrinsicHeight(size);
+ shape.setIntrinsicWidth(size);
shape.getPaint().setColor(color);
return shape;
}