summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-10-01 18:45:26 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-01 18:45:26 -0700
commit903f04632ae18faf3aa038d429ab47448a8450db (patch)
treea2b784b2c8e1108f1b2153392dfccdc6a7663497
parentedb054379ab842072849d92c28ec9029c163d6b1 (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();