summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-10-01 05:23:15 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-01 05:23:15 -0700
commite6cb1cf45e485ca6d446723235dde007df9282d9 (patch)
tree1772f9ae7e24124f62c53c5b30ded488443ddfd3
parent8f9abc4769b2cfe2fd47499048657563978b856d (diff)
parent5f3a4778f26d71fddc73dc65b3ab3639abc4771a (diff)
am dc8cda5a: Make sure glowpad is centered when gravity is centered.
* commit 'dc8cda5a71ee4ee644561fed0767c6d0b3a3447d': Make sure glowpad is centered when gravity is centered.
-rw-r--r--InCallUI/res/layout/answer_fragment.xml1
-rw-r--r--InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java6
2 files changed, 4 insertions, 3 deletions
diff --git a/InCallUI/res/layout/answer_fragment.xml b/InCallUI/res/layout/answer_fragment.xml
index 4f31e3fd8..ee2b0767c 100644
--- a/InCallUI/res/layout/answer_fragment.xml
+++ b/InCallUI/res/layout/answer_fragment.xml
@@ -24,6 +24,7 @@
android:layout_height="wrap_content"
android:focusable="true"
android:layout_centerHorizontal="true"
+ android:gravity="center"
android:background="@android:color/black"
android:visibility="gone"
diff --git a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
index 3fc978a10..a346ba593 100644
--- a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
+++ b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
@@ -48,7 +48,7 @@ import java.util.ArrayList;
/**
* This is a copy of com.android.internal.widget.multiwaveview.GlowPadView with minor changes
* to remove dependencies on private api's.
- *
+ *
* Incoporated the scaling functionality.
*
* A re-usable widget containing a center, outer ring and wave animation.
@@ -1114,9 +1114,9 @@ public class GlowPadView extends View {
final float placementWidth = getRingWidth();
final float placementHeight = getRingHeight();
float newWaveCenterX = mHorizontalInset
- + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
+ + (mMaxTargetWidth + placementWidth) / 2;
float newWaveCenterY = mVerticalInset
- + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
+ + (mMaxTargetHeight + placementHeight) / 2;
if (mInitialLayout) {
stopAndHideWaveAnimation();