1 /* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.messaging.ui.contact; 17 18 import android.content.Context; 19 20 import com.android.messaging.R; 21 import com.android.messaging.ui.CustomHeaderPagerListViewHolder; 22 import com.android.messaging.ui.contact.ContactListItemView.HostInterface; 23 24 /** 25 * Holds the frequent contacts view for the contact picker's view pager. 26 */ 27 public class FrequentContactsListViewHolder extends CustomHeaderPagerListViewHolder { 28 public FrequentContactsListViewHolder(final Context context, 29 final HostInterface clivHostInterface) { 30 super(context, new ContactListAdapter(context, null, clivHostInterface, 31 false /* needAlphabetHeader */)); 32 } 33 34 @Override 35 protected int getLayoutResId() { 36 return R.layout.frequent_contacts_list_view; 37 } 38 39 @Override 40 protected int getPageTitleResId() { 41 return R.string.contact_picker_frequents_tab_title; 42 } 43 44 @Override 45 protected int getEmptyViewResId() { 46 return R.id.empty_view; 47 } 48 49 @Override 50 protected int getListViewResId() { 51 return R.id.frequent_contacts_list; 52 } 53 54 @Override 55 protected int getEmptyViewTitleResId() { 56 return R.string.contact_list_empty_text; 57 } 58 59 @Override 60 protected int getEmptyViewImageResId() { 61 return R.drawable.ic_oobe_freq_list; 62 } 63 } 64