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; 17 18 import android.content.Context; 19 import android.widget.CursorAdapter; 20 21 import com.android.messaging.R; 22 23 /** 24 * A fake {@link CustomHeaderPagerListViewHolder} for CustomHeaderViewPager tests only. 25 */ 26 public class FakeListViewHolder extends CustomHeaderPagerListViewHolder { 27 public FakeListViewHolder(final Context context, final CursorAdapter adapter) { 28 super(context, adapter); 29 } 30 31 @Override 32 protected int getLayoutResId() { 33 return 0; 34 } 35 36 @Override 37 protected int getPageTitleResId() { 38 return android.R.string.untitled; 39 } 40 41 @Override 42 protected int getEmptyViewResId() { 43 return R.id.empty_view; 44 } 45 46 @Override 47 protected int getListViewResId() { 48 return android.R.id.list; 49 } 50 51 @Override 52 protected int getEmptyViewTitleResId() { 53 return R.string.contact_list_empty_text; 54 } 55 56 @Override 57 protected int getEmptyViewImageResId() { 58 return R.drawable.ic_oobe_freq_list; 59 } 60 }