Extract a layout for the details of a call.
This will be reused in the call log since the layout is the same for
both the call log details page and the list.
Change-Id: Iddd5577f100a4d25108effb36deb43aa34aa4b07
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index 76552ab..a8da153 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -68,34 +68,7 @@
android:layout_toRightOf="@id/contact_photo"
android:layout_marginLeft="10dp"
>
- <TextView
- android:id="@+id/number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/call_detail_primary_text_color"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
- />
- <TextView
- android:id="@+id/call_type"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?attr/call_detail_primary_text_color"
- android:layout_alignParentLeft="true"
- android:layout_above="@id/number"
- />
- <TextView
- android:id="@+id/name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?attr/call_detail_primary_text_color"
- android:layout_alignParentLeft="true"
- android:layout_above="@id/call_type"
- android:paddingBottom="2dp"
- />
+ <include layout="@layout/call_log_phone_call_details" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
diff --git a/res/layout/call_log_phone_call_details.xml b/res/layout/call_log_phone_call_details.xml
new file mode 100644
index 0000000..71fd63e
--- /dev/null
+++ b/res/layout/call_log_phone_call_details.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+ <TextView
+ android:id="@+id/number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?attr/call_detail_primary_text_color"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentBottom="true"
+ />
+ <TextView
+ android:id="@+id/call_type"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?attr/call_detail_primary_text_color"
+ android:layout_alignParentLeft="true"
+ android:layout_above="@id/number"
+ />
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?attr/call_detail_primary_text_color"
+ android:layout_alignParentLeft="true"
+ android:layout_above="@id/call_type"
+ android:paddingBottom="2dp"
+ />
+</merge>