summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-04-28 16:29:38 -0700
committerAndrew Lee <anwlee@google.com>2014-04-28 16:29:50 -0700
commit7aa48391a30920007ecb42d6a1d47075fc2a9b63 (patch)
tree72ceb451d7ae1ea1622c929313a8d49e24cdbba7
parent43f80fa2bfa81f60d33c9cf855e7b7c8c0097946 (diff)
Always show the call state text view.
Before this was flashing in and out because of the change in visibility, which was causing some shifting and UI jank. Now the call state label will always take up space in the layout. Also, moved where the elapsed time view is so that it is properly aligned to mesh with new changes. Change-Id: Id8b395b18ebc1038310721d878622c6b0c15c295
-rw-r--r--InCallUI/res/layout/primary_call_info.xml42
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java11
2 files changed, 27 insertions, 26 deletions
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index 18cc70b7c..7c0a1811e 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -55,14 +55,32 @@
android:gravity="left"
android:ellipsize="end" />
- <TextView android:id="@+id/name"
+
+ <LinearLayout android:id="@+id/stateAndName"
android:layout_width="match_parent"
- android:paddingEnd="@dimen/call_banner_name_number_right_padding"
android:layout_height="wrap_content"
- android:fontFamily="sans-serif-light"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="@dimen/call_name_text_size"
- android:singleLine="true" />
+ android:orientation="horizontal" >
+
+ <TextView android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingEnd="@dimen/call_banner_name_number_right_padding"
+ android:fontFamily="sans-serif-light"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textSize="@dimen/call_name_text_size"
+ android:singleLine="true" />
+
+ <!-- Elapsed time indication for a call in progress. -->
+ <TextView android:id="@+id/elapsedTime"
+ android:gravity="right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/incall_call_banner_text_color"
+ android:singleLine="true"
+ android:visibility="invisible" />
+
+ </LinearLayout>
</LinearLayout>
@@ -93,18 +111,6 @@
android:layout_marginStart="6dp" />
</LinearLayout>
-
- <!-- Elapsed time indication for a call in progress. -->
- <TextView android:id="@+id/elapsedTime"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/incall_call_banner_text_color"
- android:singleLine="true"
- android:visibility="invisible" />
-
<!-- Call type indication: a special label and/or branding
for certain kinds of calls (like "Internet call" for a SIP call.) -->
<TextView android:id="@+id/callTypeLabel"
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 9f5b0527f..e08c6207f 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -250,15 +250,10 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
Log.v(this, "gateway " + gatewayLabel + gatewayNumber);
// Update the call state label.
- if (!TextUtils.isEmpty(callStateLabel)) {
- mCallStateLabel.setVisibility(View.VISIBLE);
- mCallStateLabel.setText(callStateLabel);
+ mCallStateLabel.setText(callStateLabel);
- if (Call.State.INCOMING == state) {
- setBluetoothOn(bluetoothOn);
- }
- } else {
- mCallStateLabel.setVisibility(View.GONE);
+ if (Call.State.INCOMING == state) {
+ setBluetoothOn(bluetoothOn);
}
}