Home | History | Annotate | Download | only in contact
      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 all contacts view for the contact picker's view pager.
     26  */
     27 public class AllContactsListViewHolder extends CustomHeaderPagerListViewHolder {
     28     public AllContactsListViewHolder(final Context context, final HostInterface clivHostInterface) {
     29         super(context, new ContactListAdapter(context, null, clivHostInterface,
     30                 true /* needAlphabetHeader */));
     31     }
     32 
     33     @Override
     34     protected int getLayoutResId() {
     35         return R.layout.all_contacts_list_view;
     36     }
     37 
     38     @Override
     39     protected int getPageTitleResId() {
     40         return R.string.contact_picker_all_contacts_tab_title;
     41     }
     42 
     43     @Override
     44     protected int getEmptyViewResId() {
     45         return R.id.empty_view;
     46     }
     47 
     48     @Override
     49     protected int getListViewResId() {
     50         return R.id.all_contacts_list;
     51     }
     52 
     53     @Override
     54     protected int getEmptyViewTitleResId() {
     55         return R.string.contact_list_empty_text;
     56     }
     57 
     58     @Override
     59     protected int getEmptyViewImageResId() {
     60         return R.drawable.ic_oobe_freq_list;
     61     }
     62 }
     63