summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-04-25 09:06:55 -0700
committerEvan Charlton <evanc@google.com>2014-04-25 09:06:55 -0700
commit9ff5a367f4799e49055262c51ad9008b949c5429 (patch)
tree2dec75175a97fa628c4f6b6865ac50e4bb2e7e48
parentb7377a252419f4a0e57ecb298e7f6816fe6ef4da (diff)
parent24f0108f02430717ad1a0c73f5e66dc69c11fd88 (diff)
resolved conflicts for merge of 121e8dc0 to master-nova
Change-Id: I8cfd2d26ddd4ea96e76758e4e3485a10fcaedd50
-rw-r--r--InCallUI/res/drawable/end_call_background.xml12
-rw-r--r--InCallUI/res/layout/call_card.xml22
-rw-r--r--InCallUI/res/values/colors.xml6
-rw-r--r--InCallUI/res/values/dimens.xml6
-rw-r--r--InCallUI/res/values/styles.xml7
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java9
6 files changed, 28 insertions, 34 deletions
diff --git a/InCallUI/res/drawable/end_call_background.xml b/InCallUI/res/drawable/end_call_background.xml
index 53f4e5432..24b437482 100644
--- a/InCallUI/res/drawable/end_call_background.xml
+++ b/InCallUI/res/drawable/end_call_background.xml
@@ -16,13 +16,7 @@
<!-- Background drawable used to render the "end call" button. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_enabled="false"
- android:drawable="@drawable/end_call_disabled_state" />
-
- <item android:state_pressed="true"
- android:drawable="@drawable/end_call_pressed_state" />
-
- <item android:drawable="@drawable/end_call_active_state" />
-
+ <item android:state_enabled="false" android:drawable="@color/end_call_disabled_color" />
+ <item android:state_pressed="true" android:drawable="@color/end_call_pressed_color" />
+ <item android:drawable="@color/end_call_active_color" />
</selector>
diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml
index a8047f237..d56b7403c 100644
--- a/InCallUI/res/layout/call_card.xml
+++ b/InCallUI/res/layout/call_card.xml
@@ -59,15 +59,23 @@
android:id="@+id/callButtonFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
+
</LinearLayout>
- <ImageButton android:id="@+id/endButton"
- style="@style/InCallEndButton"
- android:layout_width="match_parent"
- android:src="@drawable/ic_in_call_phone_hangup"
- android:background="@drawable/end_call_background"
- android:contentDescription="@string/onscreenEndCallText"
- android:layout_gravity="bottom" />
+ <FrameLayout
+ android:layout_width="@dimen/floating_action_button_width"
+ android:layout_height="@dimen/floating_action_button_height"
+ android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
+ android:layout_gravity="bottom|center">
+
+ <ImageButton android:id="@+id/endButton"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/end_call_background"
+ android:src="@drawable/ic_in_call_phone_hangup"
+ android:contentDescription="@string/onscreenEndCallText" />
+
+ </FrameLayout>
</FrameLayout>
<!-- Secondary "Call info" block, for the background ("on hold") call. -->
diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml
index ac718e215..420ba4b11 100644
--- a/InCallUI/res/values/colors.xml
+++ b/InCallUI/res/values/colors.xml
@@ -37,13 +37,13 @@
<color name="manage_conference_secondary_text_color">#888888</color>
<!-- Used when the End Call button is active -->
- <drawable name="end_call_active_state">#f22121</drawable>
+ <color name="end_call_active_color">#f22121</color>
<!-- Used when the End Call button is pressed -->
- <drawable name="end_call_pressed_state">#ff4e4e</drawable>
+ <color name="end_call_pressed_color">#ff4e4e</color>
<!-- Used when the End Call button is disabled -->
- <drawable name="end_call_disabled_state">#303030</drawable>
+ <color name="end_call_disabled_color">#303030</color>
<!-- Color of dialpad digits -->
<color name="dialpad_digits_text_color">#000000</color>
diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml
index 92e55d60c..ec0009e4f 100644
--- a/InCallUI/res/values/dimens.xml
+++ b/InCallUI/res/values/dimens.xml
@@ -44,15 +44,15 @@
<!-- Height of the main row of in-call buttons. -->
<dimen name="in_call_button_height">76dp</dimen>
- <!-- Height of the in-call "End" button. Match with Contact's dimens/call_button_height -->
- <dimen name="in_call_end_button_height">60dp</dimen>
-
<!-- Width of buttons in the extra button row. -->
<dimen name="extra_row_button_width">56dp</dimen>
<!-- Height of buttons in the extra button row. -->
<dimen name="extra_row_button_height">@dimen/in_call_button_height</dimen>
+ <!-- Bottom margin for the end call button. -->
+ <dimen name="end_call_button_margin_bottom">30dp</dimen>
+
<!-- Padding at the left and right edges of the incall_touch_ui button
cluster. This padding is necessary because we can't allow the
buttons to be very close to the edges of the screen, due to the
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index 085cdb189..7b47d6703 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -74,13 +74,6 @@
<item name="android:background">@color/button_background_color</item>
</style>
- <!-- "End" button; similar to InCallButton. -->
- <style name="InCallEndButton">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_height">@dimen/in_call_end_button_height</item>
- <item name="android:layout_weight">1</item>
- </style>
-
<!-- Buttons in extra button row. -->
<style name="InCallExtraRowButton">
<item name="android:layout_width">@dimen/extra_row_button_width</item>
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 9dabc869f..0eb77373f 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -16,13 +16,11 @@
package com.android.incallui;
-import android.animation.LayoutTransition;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.telephony.DisconnectCause;
import android.text.TextUtils;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -33,6 +31,9 @@ import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
+import com.android.contacts.common.util.ViewUtil;
+import com.android.services.telephony.common.Call;
+
import java.util.List;
/**
@@ -132,9 +133,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
getPresenter().endCallClicked();
}
});
- // Make the hit target smaller for the end button so that is creates a deadzone along the
- // inside perimeter of the button.
- mEndCallButton.setOnTouchListener(new SmallerHitTargetTouchListener());
+ ViewUtil.setupFloatingActionButton(mEndCallButton, getResources());
}
@Override