Search in sources :

Example 1 with PhoneNumberPickerFragment

use of com.android.contacts.list.PhoneNumberPickerFragment in project coursera-android by aporter.

the class DialtactsActivity method addSearchFragment.

/**
     * Add search fragment.  Note this is called during onLayout, so there's some restrictions,
     * such as executePendingTransaction can't be used in it.
     */
private void addSearchFragment() {
    // changes.
    if (mSearchFragment != null)
        return;
    final FragmentTransaction ft = getFragmentManager().beginTransaction();
    final Fragment searchFragment = new PhoneNumberPickerFragment();
    searchFragment.setUserVisibleHint(false);
    ft.add(R.id.dialtacts_frame, searchFragment);
    ft.hide(searchFragment);
    ft.commitAllowingStateLoss();
}
Also used : PhoneNumberPickerFragment(com.android.contacts.list.PhoneNumberPickerFragment) FragmentTransaction(android.app.FragmentTransaction) DialpadFragment(com.android.contacts.dialpad.DialpadFragment) Fragment(android.app.Fragment) CallLogFragment(com.android.contacts.calllog.CallLogFragment) PhoneNumberPickerFragment(com.android.contacts.list.PhoneNumberPickerFragment) PhoneFavoriteFragment(com.android.contacts.list.PhoneFavoriteFragment)

Aggregations

Fragment (android.app.Fragment)1 FragmentTransaction (android.app.FragmentTransaction)1 CallLogFragment (com.android.contacts.calllog.CallLogFragment)1 DialpadFragment (com.android.contacts.dialpad.DialpadFragment)1 PhoneFavoriteFragment (com.android.contacts.list.PhoneFavoriteFragment)1 PhoneNumberPickerFragment (com.android.contacts.list.PhoneNumberPickerFragment)1