summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-12-12 11:29:56 -0800
committerAndrew Lee <anwlee@google.com>2014-12-12 11:35:24 -0800
commitc296217682c185a33cbecf7a4c5376941d8b573f (patch)
tree768b577cd41fa46ae777b615524ab90e939a6a44
parent352e869582f3ad44f04bc204e9f462549e455206 (diff)
downloadpackages_apps_InCallUI-c296217682c185a33cbecf7a4c5376941d8b573f.tar.gz
packages_apps_InCallUI-c296217682c185a33cbecf7a4c5376941d8b573f.tar.bz2
packages_apps_InCallUI-c296217682c185a33cbecf7a4c5376941d8b573f.zip
Support RTL in InCall call card.
+ Specify "START" text alignment for call state label and the name. + Specify "END" text alignment for the elapsed time. + Make the elapsed time view expand to take the parent's width, instead of the number and location label's parent view. + Switch elapsed time text alignment to START if the number and label view is hidden. Bug: 18716511 Change-Id: I6d2ef5fe8a4364d42fb0438541e00ecce3daeaab
-rw-r--r--res/layout/primary_call_info.xml10
-rw-r--r--src/com/android/incallui/CallCardFragment.java2
2 files changed, 9 insertions, 3 deletions
diff --git a/res/layout/primary_call_info.xml b/res/layout/primary_call_info.xml
index 1f3b9549..71369d47 100644
--- a/res/layout/primary_call_info.xml
+++ b/res/layout/primary_call_info.xml
@@ -64,6 +64,7 @@
<TextView android:id="@+id/callStateLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/incall_accent_color"
android:textSize="@dimen/call_status_text_size"
@@ -71,6 +72,7 @@
android:singleLine="true"
android:gravity="start"
android:ellipsize="end" />
+
</LinearLayout>
<!-- Name (or the phone number, if we don't have a name to display). -->
@@ -80,6 +82,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="-5dp"
android:fontFamily="sans-serif-light"
+ android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="@dimen/call_name_text_size"
android:singleLine="true"
@@ -95,9 +98,8 @@
<!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
<LinearLayout android:id="@+id/labelAndNumber"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:orientation="horizontal">
<TextView android:id="@+id/label"
@@ -122,9 +124,11 @@
<!-- Elapsed time indication for a call in progress. -->
<TextView android:id="@+id/elapsedTime"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:layout_weight="1"
android:layout_centerVertical="true"
+ android:textAlignment="viewEnd"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/incall_call_banner_subtext_color"
android:textSize="@dimen/call_label_text_size"
diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java
index 8648eee3..5e76f36a 100644
--- a/src/com/android/incallui/CallCardFragment.java
+++ b/src/com/android/incallui/CallCardFragment.java
@@ -425,8 +425,10 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
if (TextUtils.isEmpty(number) && TextUtils.isEmpty(label)) {
mCallNumberAndLabel.setVisibility(View.GONE);
+ mElapsedTime.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
} else {
mCallNumberAndLabel.setVisibility(View.VISIBLE);
+ mElapsedTime.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_END);
}
setPrimaryPhoneNumber(number);