summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-05-22 05:14:55 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-05-22 05:14:55 -0700
commit13da52a2c7279c7bded3c230fa80a41d646fc013 (patch)
tree28b5eef30a9d114c6c1afeb4941c80dff3c00ef4
parent73e2c7ac711f0b9ad32bb8f133f56fad77ce1df0 (diff)
parent488b6feb867e662fb20acf89bc81307f07a6e766 (diff)
downloadframeworks_base-13da52a2c7279c7bded3c230fa80a41d646fc013.zip
frameworks_base-13da52a2c7279c7bded3c230fa80a41d646fc013.tar.gz
frameworks_base-13da52a2c7279c7bded3c230fa80a41d646fc013.tar.bz2
Merge "Fix layout of MultiWaveView and GlowPadView." into cm-10.1
-rw-r--r--core/java/com/android/internal/widget/multiwaveview/GlowPadView.java8
-rw-r--r--core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java8
2 files changed, 4 insertions, 12 deletions
diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
index 6fb50e5..363a208 100644
--- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
@@ -1182,17 +1182,13 @@ public class GlowPadView extends View {
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
- final int width = right - left;
- final int height = bottom - top;
// Target placement width/height. This puts the targets on the greater of the ring
// width or the specified outer radius.
final float placementWidth = getRingWidth();
final float placementHeight = getRingHeight();
- float newWaveCenterX = mHorizontalInset
- + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
- float newWaveCenterY = mVerticalInset
- + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
+ float newWaveCenterX = mHorizontalInset + (mMaxTargetWidth + placementWidth) / 2;
+ float newWaveCenterY = mVerticalInset + (mMaxTargetHeight + placementHeight) / 2;
if (mInitialLayout) {
stopAndHideWaveAnimation();
diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
index e22d1e8..5c3858b 100644
--- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
@@ -1006,17 +1006,13 @@ public class MultiWaveView extends View {
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
- final int width = right - left;
- final int height = bottom - top;
// Target placement width/height. This puts the targets on the greater of the ring
// width or the specified outer radius.
final float placementWidth = Math.max(mOuterRing.getWidth(), 2 * mOuterRadius);
final float placementHeight = Math.max(mOuterRing.getHeight(), 2 * mOuterRadius);
- float newWaveCenterX = mHorizontalInset
- + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
- float newWaveCenterY = mVerticalInset
- + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
+ float newWaveCenterX = mHorizontalInset + (mMaxTargetWidth + placementWidth) / 2;
+ float newWaveCenterY = mVerticalInset + (mMaxTargetHeight + placementHeight) / 2;
if (mInitialLayout) {
hideChevrons();