summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-04-10 17:28:26 -0700
committerAndrew Lee <anwlee@google.com>2015-04-10 17:52:16 -0700
commitf3170880408642ca4389cd6c85b71eeecee4bced (patch)
tree8a60435656cd7bef81dd6ad33246b79e318614c7 /res/layout
parentf7a478d2e65956d819c8126afa3a68646b2508cb (diff)
downloadandroid_packages_apps_Dialer-f3170880408642ca4389cd6c85b71eeecee4bced.tar.gz
android_packages_apps_Dialer-f3170880408642ca4389cd6c85b71eeecee4bced.tar.bz2
android_packages_apps_Dialer-f3170880408642ca4389cd6c85b71eeecee4bced.zip
Cardify the call log list items!
+ Added card view dependencies to makefile. + Convert call log list items to use card views. + Cleaned up code style and unused views in fragment xml. - Removed deprecated expand code (more work to be done here). - Removed now-unused constants. Bug: 19372817 Change-Id: I237cf214f8f052de5fb1f41908d6012f52de994e
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/call_log_fragment.xml34
-rw-r--r--res/layout/call_log_list_item.xml62
2 files changed, 40 insertions, 56 deletions
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index c126b778b..ff0d58e00 100644
--- a/res/layout/call_log_fragment.xml
+++ b/res/layout/call_log_fragment.xml
@@ -28,36 +28,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
- <include layout="@layout/call_log_voicemail_status"
- />
- </FrameLayout>
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <TextView
- android:id="@+id/filter_status"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/ContactListSeparatorTextViewStyle"
- android:layout_marginStart="@dimen/call_log_outer_margin"
- android:layout_marginEnd="@dimen/call_log_outer_margin"
- android:paddingTop="@dimen/call_log_inner_margin"
- android:paddingBottom="@dimen/call_log_inner_margin"
- android:layout_alignParentStart="true"
- android:layout_alignParentBottom="true"
- android:visibility="gone"
- />
- <View
- android:id="@+id/call_log_divider"
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:layout_marginStart="@dimen/call_log_outer_margin"
- android:layout_marginEnd="@dimen/call_log_outer_margin"
- android:layout_gravity="bottom"
- android:background="#55ffffff"
- />
+ <include layout="@layout/call_log_voicemail_status" />
+
</FrameLayout>
+
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -65,7 +40,8 @@
<android.support.v7.widget.RecyclerView android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_list_items" />
+ android:background="@color/background_dialer_list_items"
+ android:padding="8dp" />
<include
android:id="@+id/empty_list_view"
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index 910e78f5e..1fbc579d9 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -37,13 +37,17 @@
<!-- Linear layout to separate the primary area containing the contact badge and caller
information and the secondary action (call details / play voicemail). -->
- <LinearLayout
+ <android.support.v7.widget.CardView
+ xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/call_log_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_margin="4dp"
android:baselineAligned="false"
android:orientation="vertical"
- android:gravity="center_vertical" >
+ android:gravity="center_vertical"
+ card_view:cardCornerRadius="4dp"
+ card_view:cardBackgroundColor="@color/background_dialer_list_items">
<!-- Primary area containing the contact badge and caller information -->
<LinearLayout
@@ -60,6 +64,7 @@
android:focusable="true"
android:nextFocusRight="@+id/call_back_action"
android:nextFocusLeft="@+id/quick_contact_photo" >
+
<QuickContactBadge
android:id="@+id/quick_contact_photo"
android:layout_width="@dimen/contact_photo_size"
@@ -67,16 +72,16 @@
android:paddingTop="2dp"
android:nextFocusRight="@id/primary_action_view"
android:layout_gravity="top"
- android:focusable="true"
- />
+ android:focusable="true" />
+
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_vertical"
- android:layout_marginStart="@dimen/call_log_start_margin"
- >
+ android:layout_marginStart="@dimen/call_log_start_margin">
+
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
@@ -85,8 +90,8 @@
android:layout_marginEnd="@dimen/call_log_icon_margin"
android:textColor="?attr/call_log_primary_text_color"
android:textSize="@dimen/call_log_primary_text_size"
- android:singleLine="true"
- />
+ android:singleLine="true" />
+
<TextView
android:id="@+id/voicemail_transcription"
android:layout_width="wrap_content"
@@ -96,22 +101,22 @@
android:textSize="@dimen/call_log_secondary_text_size"
android:singleLine="true"
android:ellipsize="marquee"
- android:visibility="gone"
- />
+ android:visibility="gone" />
+
<LinearLayout
android:id="@+id/call_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- >
+ android:orientation="horizontal">
+
<view
class="com.android.dialer.calllog.CallTypeIconsView"
android:id="@+id/call_type_icons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/call_log_icon_margin"
- android:layout_gravity="center_vertical"
- />
+ android:layout_gravity="center_vertical" />
+
<TextView
android:id="@+id/call_location_and_date"
android:layout_width="wrap_content"
@@ -120,9 +125,10 @@
android:layout_gravity="center_vertical"
android:textColor="?attr/call_log_secondary_text_color"
android:textSize="@dimen/call_log_secondary_text_size"
- android:singleLine="true"
- />
+ android:singleLine="true" />
+
</LinearLayout>
+
<TextView
android:id="@+id/call_account_label"
android:layout_width="wrap_content"
@@ -131,9 +137,10 @@
android:textColor="?attr/call_log_secondary_text_color"
android:textSize="@dimen/call_log_secondary_text_size"
android:visibility="gone"
- android:singleLine="true"
- />
+ android:singleLine="true" />
+
</LinearLayout>
+
<ImageView
android:id="@+id/call_indicator_icon"
android:layout_width="wrap_content"
@@ -144,16 +151,17 @@
android:tint="@color/recent_call_log_item_phone_icon_tint"
android:alpha="0.3"
android:importantForAccessibility="no"
- android:visibility="gone"
- />
+ android:visibility="gone" />
+
+ <!-- Viewstub with additional expandable actions for a call log entry -->
+ <ViewStub android:id="@+id/call_log_entry_actions_stub"
+ android:inflatedId="@+id/call_log_entry_actions"
+ android:layout="@layout/call_log_list_item_actions"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+
</LinearLayout>
- <!-- Viewstub with additional expandable actions for a call log entry -->
- <ViewStub android:id="@+id/call_log_entry_actions_stub"
- android:inflatedId="@+id/call_log_entry_actions"
- android:layout="@layout/call_log_list_item_actions"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- </LinearLayout>
+ </android.support.v7.widget.CardView>
</LinearLayout>