summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowManager.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-11-01 12:31:24 -0700
committerDianne Hackborn <hackbod@google.com>2010-11-01 14:48:34 -0700
commit8eb2e244f9b14d946ee587d0b673b866865026c0 (patch)
tree5b99820a9b2db1ec63836d6e1c806e6317e25c07 /core/java/android/view/WindowManager.java
parent5060309f4cdb4b231484a0b1cdcccf8569f06705 (diff)
Various PreferenceActivity and related improvement.
This is all about making the preferences implementation better. Well, mostly all about that. Change-Id: I8efa98cb5680f3ccfa3ed694a1586de3fb3a9e11
Diffstat (limited to 'core/java/android/view/WindowManager.java')
-rw-r--r--core/java/android/view/WindowManager.java48
1 files changed, 42 insertions, 6 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index e5f4b087e6fe..c657a1c7908f 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -794,7 +794,17 @@ public interface WindowManager extends ViewManager {
public int softInputMode;
/**
- * Placement of window within the screen as per {@link Gravity}
+ * Placement of window within the screen as per {@link Gravity}. Both
+ * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int,
+ * android.graphics.Rect) Gravity.apply} and
+ * {@link Gravity#applyDisplay(int, android.graphics.Rect, android.graphics.Rect)
+ * Gravity.applyDisplay} are used during window layout, with this value
+ * given as the desired gravity. For example you can specify
+ * {@link Gravity#DISPLAY_CLIP_HORIZONTAL Gravity.DISPLAY_CLIP_HORIZONTAL} and
+ * {@link Gravity#DISPLAY_CLIP_VERTICAL Gravity.DISPLAY_CLIP_VERTICAL} here
+ * to control the behavior of
+ * {@link Gravity#applyDisplay(int, android.graphics.Rect, android.graphics.Rect)
+ * Gravity.applyDisplay}.
*
* @see Gravity
*/
@@ -802,13 +812,19 @@ public interface WindowManager extends ViewManager {
/**
* The horizontal margin, as a percentage of the container's width,
- * between the container and the widget.
+ * between the container and the widget. See
+ * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int,
+ * android.graphics.Rect) Gravity.apply} for how this is used. This
+ * field is added with {@link #x} to supply the <var>xAdj</var> parameter.
*/
public float horizontalMargin;
/**
* The vertical margin, as a percentage of the container's height,
- * between the container and the widget.
+ * between the container and the widget. See
+ * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int,
+ * android.graphics.Rect) Gravity.apply} for how this is used. This
+ * field is added with {@link #y} to supply the <var>yAdj</var> parameter.
*/
public float verticalMargin;
@@ -1168,14 +1184,22 @@ public interface WindowManager extends ViewManager {
sb.append('x');
sb.append((height== MATCH_PARENT ?"fill":(height==WRAP_CONTENT?"wrap":height)));
sb.append(")");
- if (softInputMode != 0) {
- sb.append(" sim=#");
- sb.append(Integer.toHexString(softInputMode));
+ if (horizontalMargin != 0) {
+ sb.append(" hm=");
+ sb.append(horizontalMargin);
+ }
+ if (verticalMargin != 0) {
+ sb.append(" vm=");
+ sb.append(verticalMargin);
}
if (gravity != 0) {
sb.append(" gr=#");
sb.append(Integer.toHexString(gravity));
}
+ if (softInputMode != 0) {
+ sb.append(" sim=#");
+ sb.append(Integer.toHexString(softInputMode));
+ }
sb.append(" ty=");
sb.append(type);
sb.append(" fl=#");
@@ -1190,6 +1214,18 @@ public interface WindowManager extends ViewManager {
sb.append(" or=");
sb.append(screenOrientation);
}
+ if (alpha != 1.0f) {
+ sb.append(" alpha=");
+ sb.append(alpha);
+ }
+ if (screenBrightness != BRIGHTNESS_OVERRIDE_NONE) {
+ sb.append(" sbrt=");
+ sb.append(screenBrightness);
+ }
+ if (buttonBrightness != BRIGHTNESS_OVERRIDE_NONE) {
+ sb.append(" bbrt=");
+ sb.append(buttonBrightness);
+ }
if ((flags & FLAG_COMPATIBLE_WINDOW) != 0) {
sb.append(" compatible=true");
}