From 59b1088845d9c0f289e89cf49701263c9f12b50c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 6 Mar 2015 15:17:44 -0800 Subject: Replace tabs-text with icons. + Add resources and drawables for icons to label the tabs. + Pass drawable ids to the ViewPagerTabs in ListsFragment. Change-Id: Ib7b3fcaa2257fc439b6fae8b017646c3d150eb56 --- src/com/android/dialer/list/ListsFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/com/android/dialer') diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 45b2f689d..0410814b8 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -80,6 +80,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste new ArrayList(); private String[] mTabTitles; + private int[] mTabIcons; private CallLogAdapter mCallLogAdapter; private CallLogQueryHandler mCallLogQueryHandler; @@ -220,7 +221,13 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mTabTitles[TAB_INDEX_RECENTS] = getResources().getString(R.string.tab_recents); mTabTitles[TAB_INDEX_ALL_CONTACTS] = getResources().getString(R.string.tab_all_contacts); + mTabIcons = new int[TAB_INDEX_COUNT]; + mTabIcons[TAB_INDEX_SPEED_DIAL] = R.drawable.tab_speed_dial; + mTabIcons[TAB_INDEX_RECENTS] = R.drawable.tab_recents; + mTabIcons[TAB_INDEX_ALL_CONTACTS] = R.drawable.tab_contacts; + mViewPagerTabs = (ViewPagerTabs) parentView.findViewById(R.id.lists_pager_header); + mViewPagerTabs.setTabIcons(mTabIcons); mViewPagerTabs.setViewPager(mViewPager); addOnPageChangeListener(mViewPagerTabs); -- cgit v1.2.3