diff options
author | Yorke Lee <yorkelee@google.com> | 2014-04-12 12:42:06 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-04-16 10:04:02 -0700 |
commit | e00c9fe163d19ee380b922e3fcbe736216d78ccc (patch) | |
tree | 18a9d714c73ff5620ca6e2b99b98312b06aecbac /res | |
parent | 32e7495570c1e8ba9cfd4b32998e8b13fd37f46a (diff) |
Use ViewPager in main Dialer view
This change replaces PhoneFavoriteFragment with ListsFragment,
a fragment that contains a Viewpager that will eventually
contain 3 fragments - Speed Dial, Recents (an abridged call log) and
All Contacts. For now, only speed dial and all contacts are in the
viewpager due to the call log fragment not playing nice with being
embedded in a parent fragment.
ViewPagerTabs is a newly added custom view that serves as a indicator
for ViewPager tabs. It behaves similarly to the newly deprecated
ActionBar tabs, but can be placed anywhere on screen.
Bug: 13935070
Change-Id: I916c516dc295246b2a95de2f0dc726784c2ee0cc
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/lists_fragment.xml | 36 | ||||
-rw-r--r-- | res/layout/phone_favorites_fragment.xml | 1 | ||||
-rw-r--r-- | res/layout/phone_favorites_menu.xml | 6 | ||||
-rw-r--r-- | res/values/strings.xml | 22 |
4 files changed, 54 insertions, 11 deletions
diff --git a/res/layout/lists_fragment.xml b/res/layout/lists_fragment.xml new file mode 100644 index 000000000..d4995e0f2 --- /dev/null +++ b/res/layout/lists_fragment.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingTop="?android:attr/actionBarSize" + android:orientation="vertical" + android:id="@+id/lists_frame"> + <com.android.dialer.list.ViewPagerTabs + android:id="@+id/lists_pager_header" + android:layout_width="match_parent" + android:layout_height="?android:attr/actionBarSize" + android:textAllCaps="true" + android:orientation="horizontal" + android:layout_gravity="top"/> + <android.support.v4.view.ViewPager + android:id="@+id/lists_pager" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + </android.support.v4.view.ViewPager> +</LinearLayout> diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml index 91acb9058..7a1f05ae6 100644 --- a/res/layout/phone_favorites_fragment.xml +++ b/res/layout/phone_favorites_fragment.xml @@ -35,7 +35,6 @@ android:id="@+id/contact_tile_list" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="?android:attr/actionBarSize" android:clipToPadding="false" android:fadingEdge="none" android:divider="@null" /> diff --git a/res/layout/phone_favorites_menu.xml b/res/layout/phone_favorites_menu.xml index 387ea5b3f..0f7aa219e 100644 --- a/res/layout/phone_favorites_menu.xml +++ b/res/layout/phone_favorites_menu.xml @@ -16,11 +16,13 @@ --> <!-- The phone favorites menu appears on the main dialer screen above the favorite callers area, - and provides access to the All Contacts list. --> + and provides access to the All Contacts list. This is 1dp tall as a temporary hack to hide + it because it is no longer being used. It should be removed from its parent adapter entirely + eventually. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/phone_favorites_menu" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="1dp" android:paddingLeft="@dimen/favorites_menu_padding_horizontal" android:paddingRight="@dimen/favorites_menu_padding_horizontal" android:paddingTop="@dimen/favorites_menu_padding_top" diff --git a/res/values/strings.xml b/res/values/strings.xml index c608273ff..d67c788da 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -624,14 +624,6 @@ [CHAR LIMIT=30] --> <string name="dialer_hint_find_contact">Type a name or phone number</string> - <!-- Title for the call log tab containing the list of all voicemails and calls - [CHAR LIMIT=15] --> - <string name="call_log_all_title">All</string> - - <!-- Title for the call log tab containing the list of all missed calls only - [CHAR LIMIT=15] --> - <string name="call_log_missed_title">Missed</string> - <!-- String resource for the font-family to use for the call log activity's title Do not translate. --> <string name="call_log_activity_title_font_family">sans-serif-light</string> @@ -705,6 +697,20 @@ <!-- Do not translate. --> <string name="dialpad_pound_letters"></string> + <!-- Title for the call log tab containing the list of all voicemails and calls + [CHAR LIMIT=15] --> + <string name="call_log_all_title">All</string> + + <!-- Title for the call log tab containing the list of all missed calls only + [CHAR LIMIT=15] --> + <string name="call_log_missed_title">Missed</string> + + <string name="tab_speed_dial">Speed Dial</string> + + <string name="tab_recents">Recents</string> + + <string name="tab_all_contacts">Contacts</string> + <!-- Title of fragment that displays all contacts --> <string name="show_all_contacts_title">All contacts</string> <!-- Title of show all contacts button --> |