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
18package com.android.dialer.list;
19
20import android.app.Activity;
21import android.os.Bundle;
22import android.view.LayoutInflater;
23import android.view.View;
24import android.view.ViewGroup;
25
26import com.android.contacts.common.list.ContactListItemView;
27import com.android.contacts.common.list.PhoneNumberPickerFragment;
28import com.android.dialer.R;
29
30/**
31 * Fragments to show all contacts with phone numbers.
32 */
33public 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