Use Fragments for tabs
This will require more work later, but it is a first step that should allow
all features to still be accessible
Change-Id: Iad544575960e6a8beb5f0018ae9a8b5633fe8281
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 14a6b39..63ca3bd 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -14,26 +14,35 @@
limitations under the License.
-->
-<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/tabhost"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <LinearLayout
- android:orientation="vertical"
+ <!-- Dialer --> -->
+ <fragment
+ class="com.android.contacts.dialpad.DialpadFragment"
+ android:id="@+id/dialpad_fragment"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent" />
- <TabWidget android:id="@android:id/tabs"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- />
+ <!-- Call Log -->
+ <fragment
+ class="com.android.contacts.calllog.CallLogFragment"
+ android:id="@+id/call_log_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
- <FrameLayout android:id="@android:id/tabcontent"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- />
- </LinearLayout>
-</TabHost>
+ <!-- Contacts -->
+ <fragment
+ android:id="@+id/contacts_fragment"
+ class="com.android.contacts.list.DefaultContactBrowseListFragment"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent" />
+ <!-- Favorites -->
+ <fragment
+ android:id="@+id/favorites_fragment"
+ class="com.android.contacts.list.DefaultContactBrowseListFragment"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent" />
+</FrameLayout>
\ No newline at end of file
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 2469a3d..82de51e 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -15,8 +15,27 @@
-->
<resources>
<style name="DialtactsTheme" parent="android:Theme.Holo.Light">
- <item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
+ <item name="list_item_height">?android:attr/listPreferredItemHeight</item>
+ <item name="activated_background">@drawable/list_item_activated_background</item>
+ <item name="section_header_background">@drawable/list_title_holo</item>
+ <item name="list_section_header_height">32dip</item>
+ <item name="list_item_divider">@drawable/list_item_divider</item>
+ <item name="list_item_padding_top">4dip</item>
+ <item name="list_item_padding_right">11dip</item>
+ <item name="list_item_padding_bottom">4dip</item>
+ <item name="list_item_padding_left">4dip</item>
+ <item name="list_item_gap_between_image_and_text">8dip</item>
+ <item name="list_item_gap_between_label_and_data">5dip</item>
+ <item name="list_item_call_button_padding">14dip</item>
+ <item name="list_item_vertical_divider_margin">5dip</item>
+ <item name="list_item_presence_icon_margin">5dip</item>
+ <item name="list_item_photo_size">56dip</item>
+ <item name="list_item_prefix_highlight_color">#729a27</item>
+ <item name="list_item_header_text_indent">56dip</item>
+ <item name="list_item_header_text_color">?color/section_header_text_color</item>
+ <item name="list_item_header_text_size">14sp</item>
+ <item name="contact_filter_popup_width">320dip</item>
</style>
<style name="CallDetailActivityTheme" parent="android:Theme.Holo.Light">