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 --- res/drawable-hdpi/ic_grade_24dp.png | Bin 0 -> 370 bytes res/drawable-hdpi/ic_people_24dp.png | Bin 0 -> 299 bytes res/drawable-hdpi/ic_schedule_24dp.png | Bin 0 -> 575 bytes res/drawable-mdpi/ic_grade_24dp.png | Bin 0 -> 271 bytes res/drawable-mdpi/ic_people_24dp.png | Bin 0 -> 210 bytes res/drawable-mdpi/ic_schedule_24dp.png | Bin 0 -> 377 bytes res/drawable-xhdpi/ic_grade_24dp.png | Bin 0 -> 479 bytes res/drawable-xhdpi/ic_people_24dp.png | Bin 0 -> 368 bytes res/drawable-xhdpi/ic_schedule_24dp.png | Bin 0 -> 737 bytes res/drawable-xxhdpi/ic_grade_24dp.png | Bin 0 -> 676 bytes res/drawable-xxhdpi/ic_people_24dp.png | Bin 0 -> 488 bytes res/drawable-xxhdpi/ic_schedule_24dp.png | Bin 0 -> 1107 bytes res/drawable-xxxhdpi/ic_grade_24dp.png | Bin 0 -> 887 bytes res/drawable-xxxhdpi/ic_people_24dp.png | Bin 0 -> 636 bytes res/drawable-xxxhdpi/ic_schedule_24dp.png | Bin 0 -> 1478 bytes src/com/android/dialer/list/ListsFragment.java | 7 +++++++ 16 files changed, 7 insertions(+) create mode 100644 res/drawable-hdpi/ic_grade_24dp.png create mode 100644 res/drawable-hdpi/ic_people_24dp.png create mode 100644 res/drawable-hdpi/ic_schedule_24dp.png create mode 100644 res/drawable-mdpi/ic_grade_24dp.png create mode 100644 res/drawable-mdpi/ic_people_24dp.png create mode 100644 res/drawable-mdpi/ic_schedule_24dp.png create mode 100644 res/drawable-xhdpi/ic_grade_24dp.png create mode 100644 res/drawable-xhdpi/ic_people_24dp.png create mode 100644 res/drawable-xhdpi/ic_schedule_24dp.png create mode 100644 res/drawable-xxhdpi/ic_grade_24dp.png create mode 100644 res/drawable-xxhdpi/ic_people_24dp.png create mode 100644 res/drawable-xxhdpi/ic_schedule_24dp.png create mode 100644 res/drawable-xxxhdpi/ic_grade_24dp.png create mode 100644 res/drawable-xxxhdpi/ic_people_24dp.png create mode 100644 res/drawable-xxxhdpi/ic_schedule_24dp.png diff --git a/res/drawable-hdpi/ic_grade_24dp.png b/res/drawable-hdpi/ic_grade_24dp.png new file mode 100644 index 000000000..86eecdd4a Binary files /dev/null and b/res/drawable-hdpi/ic_grade_24dp.png differ diff --git a/res/drawable-hdpi/ic_people_24dp.png b/res/drawable-hdpi/ic_people_24dp.png new file mode 100644 index 000000000..ff698afc0 Binary files /dev/null and b/res/drawable-hdpi/ic_people_24dp.png differ diff --git a/res/drawable-hdpi/ic_schedule_24dp.png b/res/drawable-hdpi/ic_schedule_24dp.png new file mode 100644 index 000000000..f3581d104 Binary files /dev/null and b/res/drawable-hdpi/ic_schedule_24dp.png differ diff --git a/res/drawable-mdpi/ic_grade_24dp.png b/res/drawable-mdpi/ic_grade_24dp.png new file mode 100644 index 000000000..d2cbe4c92 Binary files /dev/null and b/res/drawable-mdpi/ic_grade_24dp.png differ diff --git a/res/drawable-mdpi/ic_people_24dp.png b/res/drawable-mdpi/ic_people_24dp.png new file mode 100644 index 000000000..270e4de2e Binary files /dev/null and b/res/drawable-mdpi/ic_people_24dp.png differ diff --git a/res/drawable-mdpi/ic_schedule_24dp.png b/res/drawable-mdpi/ic_schedule_24dp.png new file mode 100644 index 000000000..501ee842e Binary files /dev/null and b/res/drawable-mdpi/ic_schedule_24dp.png differ diff --git a/res/drawable-xhdpi/ic_grade_24dp.png b/res/drawable-xhdpi/ic_grade_24dp.png new file mode 100644 index 000000000..d65f39d7c Binary files /dev/null and b/res/drawable-xhdpi/ic_grade_24dp.png differ diff --git a/res/drawable-xhdpi/ic_people_24dp.png b/res/drawable-xhdpi/ic_people_24dp.png new file mode 100644 index 000000000..323981ccf Binary files /dev/null and b/res/drawable-xhdpi/ic_people_24dp.png differ diff --git a/res/drawable-xhdpi/ic_schedule_24dp.png b/res/drawable-xhdpi/ic_schedule_24dp.png new file mode 100644 index 000000000..2e27936a4 Binary files /dev/null and b/res/drawable-xhdpi/ic_schedule_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_grade_24dp.png b/res/drawable-xxhdpi/ic_grade_24dp.png new file mode 100644 index 000000000..aa5879215 Binary files /dev/null and b/res/drawable-xxhdpi/ic_grade_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_people_24dp.png b/res/drawable-xxhdpi/ic_people_24dp.png new file mode 100644 index 000000000..6c68435fb Binary files /dev/null and b/res/drawable-xxhdpi/ic_people_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_schedule_24dp.png b/res/drawable-xxhdpi/ic_schedule_24dp.png new file mode 100644 index 000000000..bfc72736a Binary files /dev/null and b/res/drawable-xxhdpi/ic_schedule_24dp.png differ diff --git a/res/drawable-xxxhdpi/ic_grade_24dp.png b/res/drawable-xxxhdpi/ic_grade_24dp.png new file mode 100644 index 000000000..7f38d0963 Binary files /dev/null and b/res/drawable-xxxhdpi/ic_grade_24dp.png differ diff --git a/res/drawable-xxxhdpi/ic_people_24dp.png b/res/drawable-xxxhdpi/ic_people_24dp.png new file mode 100644 index 000000000..5676f7041 Binary files /dev/null and b/res/drawable-xxxhdpi/ic_people_24dp.png differ diff --git a/res/drawable-xxxhdpi/ic_schedule_24dp.png b/res/drawable-xxxhdpi/ic_schedule_24dp.png new file mode 100644 index 000000000..b94f4dfa1 Binary files /dev/null and b/res/drawable-xxxhdpi/ic_schedule_24dp.png differ 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