1 /* 2 3 * Copyright (C) 2013 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.android.dialer.list; 19 20 import android.app.Activity; 21 import android.os.Bundle; 22 import android.view.LayoutInflater; 23 import android.view.View; 24 import android.view.ViewGroup; 25 26 import com.android.contacts.common.list.ContactListItemView; 27 import com.android.contacts.common.list.PhoneNumberPickerFragment; 28 import com.android.dialer.R; 29 30 /** 31 * Fragments to show all contacts with phone numbers. 32 */ 33 public class AllContactsFragment extends PhoneNumberPickerFragment{ 34 35 @Override 36 public void onCreate(Bundle savedInstanceState) { 37 super.onCreate(savedInstanceState); 38 } 39 40 @Override 41 public void onAttach(Activity activity) { 42 super.onAttach(activity); 43 44 // Customizes the listview according to the dialer specifics. 45 setQuickContactEnabled(true); 46 setDarkTheme(false); 47 setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(true /* opposite */)); 48 setUseCallableUri(true); 49 } 50 51 @Override 52 protected View inflateView(LayoutInflater inflater, ViewGroup container) { 53 return inflater.inflate(R.layout.show_all_contacts_fragment, null); 54 } 55 } 56