diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-05-10 01:14:47 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-10 01:14:47 +0000 |
commit | ced93f2d22bffce3b4cfb9c3bfce862b385537dd (patch) | |
tree | 2b4715070bcf45b8a8395ee0ae5c7fbb0ef8274c /java/com/android/dialer/calllog/ui/res/layout | |
parent | c49c914e53500fc661ec47e365621c9d33e046ca (diff) | |
parent | 2f4a0075e9f546514359eda60a24ac9cd49ea80a (diff) |
Merge changes Ia54e3421,Id2176e6e,I0311770e,I79f99c34,I8579afff, ...
* changes:
Add some annotations that won't influence aosp.
Update answer button logic.
Hide new after call spam blocking promo behind an additional flag.
Allow the TextView for call log primary text to adjust size when recycled.
Format callback phone number.
Added getLoggingName() to CallLogDataSource and PhoneLookup interfaces.
Do not show bubble for outgoing call if it's not a background call.
Always fetch status onResume and add logging for voicemail status in OldMainPeer and
Place Duo calls with PreCall
Creating CallIntent, AutoValue builder, to replace CallIntentBuilder.
Set the DisplayNameSource to PHONE in DefaultLookupUriGenerator.
Config correct layout boundaries to accommodate long text (call log & bottom sheet)
Use info from EmergencyPhoneLookup to render UI for an emergency number.
Implement EmergencyPhoneLookup for checking if a number is an emergency number.
Add GlobalSpamListStatus and UserSpamListStatus
Move SpamStatus classes into subpackage
Delete obsolete checkSpamStatus(Listener) API
Update callers of checkSpamStatus to use Future based API
Fix bug that showing block option for private number.
Add a null check for digitsHint.
Don't commit fragment transactions if it's not safe.
Add ListenableFuture based APIs for checkSpamStatus
Pass activity between new call log's adapter/view holder.
Replace assert checks with safety checks instead.
Add SimpleSpamStatus and use it in FakeSpam and SpamStub
Show calls to/from emergency numbers as "Emergency number" in call log & call details
Diffstat (limited to 'java/com/android/dialer/calllog/ui/res/layout')
-rw-r--r-- | java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml | 91 |
1 files changed, 49 insertions, 42 deletions
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml index e3052c097..2fc8e7bb8 100644 --- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml +++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml @@ -17,6 +17,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="72dp"> @@ -29,22 +30,34 @@ android:layout_marginEnd="10dp" android:layout_centerVertical="true"/> - <!-- The frame layout is necessary to avoid clipping the icons and ellipsize the text when the - content is too wide to fit. - --> - <FrameLayout - android:id="@+id/primary_row" + <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="14dp" android:layout_toEndOf="@+id/contact_photo_view" - android:layout_toStartOf="@+id/menu_button"> + android:layout_toStartOf="@+id/menu_button" + android:orientation="vertical"> + <!-- 1st row: primary info --> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="14dp" android:orientation="horizontal"> + <!-- + Important note: + + The following TextView is the only widget that defines a weight in the containing + LinearLayout, of which the purpose is to avoid pushing the widgets after it out of the + boundary when the text is too long. + + Generally it is more efficient to assign a width/height of 0dp so that the TextView does + not have to measure its own size since it will absorb all the remaining space anyway. + + However, as the TextView is part of an entry in the call log's RecyclerView, we must set + layout_width to "wrap_content" so that the TextView can adjust its size when recycled for + text of different lengths. + --> <TextView android:id="@+id/primary_text" style="@style/PrimaryText" @@ -54,32 +67,29 @@ android:layout_marginEnd="6dp" android:ellipsize="end" android:lineSpacingMultiplier="1.5" - android:singleLine="true"/> - + android:singleLine="true" + tools:ignore="InefficientWeight"/> <ImageView android:id="@+id/hd_icon" android:layout_width="wrap_content" android:layout_height="18dp" android:layout_gravity="center_vertical" - android:src="@drawable/quantum_ic_hd_vd_theme_24" - /> + android:src="@drawable/quantum_ic_hd_vd_theme_24"/> <ImageView android:id="@+id/wifi_icon" android:layout_width="wrap_content" android:layout_height="18dp" android:layout_gravity="center_vertical" - android:src="@drawable/quantum_ic_signal_wifi_4_bar_vd_theme_24" - /> + android:src="@drawable/quantum_ic_signal_wifi_4_bar_vd_theme_24"/> <ImageView android:id="@+id/assisted_dial_icon" android:layout_width="wrap_content" android:layout_height="18dp" android:layout_gravity="center_vertical" - android:src="@drawable/quantum_ic_language_vd_theme_24" - /> + android:src="@drawable/quantum_ic_language_vd_theme_24"/> <TextView android:id="@+id/call_count" @@ -90,43 +100,40 @@ android:lineSpacingMultiplier="1.5"/> </LinearLayout> - </FrameLayout> - - <LinearLayout - android:id="@+id/secondary_row" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@+id/primary_row" - android:layout_toEndOf="@+id/contact_photo_view" - android:orientation="horizontal"> - <ImageView - android:id="@+id/call_type_icon" + <!-- 2nd row: secondary info --> + <LinearLayout android:layout_width="wrap_content" - android:layout_height="18dp" - android:layout_gravity="center_vertical" - /> + android:layout_height="wrap_content" + android:orientation="horizontal"> + <ImageView + android:id="@+id/call_type_icon" + android:layout_width="wrap_content" + android:layout_height="18dp" + android:layout_gravity="center_vertical"/> + + <TextView + android:id="@+id/secondary_text" + style="@style/SecondaryText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="end" + android:lineSpacingMultiplier="1.4" + android:singleLine="true"/> + + </LinearLayout> + + <!-- 3rd row: phone account info --> <TextView - android:id="@+id/secondary_text" + android:id="@+id/phone_account" style="@style/SecondaryText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" - android:lineSpacingMultiplier="1.4" android:singleLine="true"/> - </LinearLayout> - <TextView - android:id="@+id/phone_account" - style="@style/SecondaryText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@+id/secondary_row" - android:layout_toEndOf="@+id/contact_photo_view" - android:ellipsize="end" - android:singleLine="true" - android:visibility="visible"/> + </LinearLayout> <ImageView android:id="@+id/menu_button" |