Support horizontal swipe in Phone app
- introduce ViewPager for swipe support
- let DialpadFragment call resolveIntent() by itself
on onCreateView()
- remove ContactsFragment (a.k.a previous "3rd" tab)
- remove resolveIntent() call in onNewIntent()
-- This was introduced to fix bug: 4724464 but we cannot
do same thing anymore, as we cannot assume views in the
Fragment is ready at that moment.
- remove some codes coping with old tab behavior.
-- After having the ViewPager, we cannot simply assume
Fragment is a replacement of previous tab activities.
Fragment creation is delayed by ViewPager, so some of
old codes causes NPE.
Bug: 4974874
Change-Id: I3b2f95b0d34e89bb9665b2014048a634d29e54ce
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 445a332..14fb137 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -4,9 +4,9 @@
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.
@@ -18,27 +18,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <!-- Dialer --> -->
- <fragment
- class="com.android.contacts.dialpad.DialpadFragment"
- android:id="@+id/dialpad_fragment"
+ <android.support.v4.view.ViewPager
+ android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <!-- 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" />
-
- <!-- Favorites -->
- <fragment
- android:id="@+id/favorites_fragment"
- class="com.android.contacts.list.StrequentContactListFragment"
- android:layout_height="match_parent"
- android:layout_width="match_parent" />
-
<!-- For phone search UI -->
<fragment
android:id="@+id/phone_number_picker_fragment"