summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard MacGregor <rmacgregor@cyngn.com>2016-05-11 10:50:11 -0700
committerRichard MacGregor <rmacgregor@cyngn.com>2016-05-13 14:06:55 -0700
commitd2095b50854010d52652f18b78f98a154c990cad (patch)
tree8178087254522ddd95b6671345e6e3bc54bfde0c
parent6eceee2febd5f09fd8c1e648042d8268e5e1fb1e (diff)
downloadpackages_apps_Dialer-d2095b50854010d52652f18b78f98a154c990cad.tar.gz
packages_apps_Dialer-d2095b50854010d52652f18b78f98a154c990cad.tar.bz2
packages_apps_Dialer-d2095b50854010d52652f18b78f98a154c990cad.zip
[2/2] Credit text and action should be limited to single line
The credit text and action weren't limited to a single line, causing increased credit bar size if text was translated into another language. Ticket CD-631 & CD-637 Change-Id: Iefa3a22ae2871560dd1347a9e59e70fda7a9c19b
-rw-r--r--res/layout/dialtacts_activity.xml53
-rw-r--r--res/values/cm_dimens.xml1
2 files changed, 20 insertions, 34 deletions
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index dc0e86ab9..e276ec750 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -64,53 +64,38 @@
android:layout_gravity="center_horizontal|bottom"
android:visibility="gone">
- <LinearLayout
+ <com.android.phone.common.widget.ResizingILDContainerLayout
android:id="@+id/ild_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
- android:weightSum="6"
android:layout_marginTop="@dimen/ild_margin_height"
- android:layout_marginBottom="@dimen/ild_margin_height">
+ android:layout_marginBottom="@dimen/ild_margin_height" >
- <LinearLayout
- android:layout_width="0dp"
+ <TextView
+ android:id="@+id/ild_country"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:singleLine="true"
- android:layout_weight="3"
android:layout_marginStart="@dimen/dialpad_credits_padding"
- android:orientation="horizontal" >
-
- <TextView
- android:id="@+id/ild_country"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/credit_banner_text"
- android:layout_gravity="start" />
-
- </LinearLayout>
+ android:textColor="@color/credit_banner_text"
+ android:textAlignment="viewStart"
+ android:singleLine="true"
+ android:ellipsize="end" />
- <LinearLayout
- android:layout_width="0dp"
+ <TextView
+ android:id="@+id/ild_rate"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:singleLine="true"
- android:layout_weight="3"
+ android:layout_marginStart="@dimen/dialpad_credits_spacing"
android:layout_marginEnd="@dimen/dialpad_credits_padding"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/ild_rate"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:textStyle="bold"
- android:textColor="@color/credit_banner_text"
- android:layout_gravity="end" />
-
- </LinearLayout>
+ android:textStyle="bold"
+ android:textColor="@color/credit_banner_text"
+ android:textAlignment="viewEnd"
+ android:singleLine="true"
+ android:ellipsize="end" />
- </LinearLayout>
+ </com.android.phone.common.widget.ResizingILDContainerLayout>
<View
android:layout_width="match_parent"
diff --git a/res/values/cm_dimens.xml b/res/values/cm_dimens.xml
index c385f501d..8567c88a8 100644
--- a/res/values/cm_dimens.xml
+++ b/res/values/cm_dimens.xml
@@ -2,6 +2,7 @@
<resources>
<dimen name="contact_list_badge_margin">1dp</dimen>
<dimen name="dialpad_credits_padding">14dp</dimen>
+ <dimen name="dialpad_credits_spacing">4dp</dimen>
<dimen name="call_log_spam_info_text_size">10sp</dimen>