Search in sources :

Example 1 with RegularSearchFragment

use of com.android.dialer.list.RegularSearchFragment in project android_packages_apps_Dialer by MoKee.

the class DialtactsActivity method onAttachFragment.

@Override
public void onAttachFragment(Fragment fragment) {
    if (fragment instanceof DialpadFragment) {
        mDialpadFragment = (DialpadFragment) fragment;
        if (!mIsDialpadShown && !mShowDialpadOnResume) {
            final FragmentTransaction transaction = getFragmentManager().beginTransaction();
            transaction.hide(mDialpadFragment);
            transaction.commit();
        }
    } else if (fragment instanceof SmartDialSearchFragment) {
        mSmartDialSearchFragment = (SmartDialSearchFragment) fragment;
        mSmartDialSearchFragment.setOnPhoneNumberPickerActionListener(this);
        if (!TextUtils.isEmpty(mDialpadQuery)) {
            mSmartDialSearchFragment.setAddToContactNumber(mDialpadQuery);
        }
    } else if (fragment instanceof SearchFragment) {
        mRegularSearchFragment = (RegularSearchFragment) fragment;
        mRegularSearchFragment.setOnPhoneNumberPickerActionListener(this);
    } else if (fragment instanceof ListsFragment) {
        mListsFragment = (ListsFragment) fragment;
        mListsFragment.addOnPageChangeListener(this);
    }
}
Also used : DialpadFragment(com.android.dialer.dialpad.DialpadFragment) FragmentTransaction(android.app.FragmentTransaction) ListsFragment(com.android.dialer.list.ListsFragment) SmartDialSearchFragment(com.android.dialer.list.SmartDialSearchFragment) RegularSearchFragment(com.android.dialer.list.RegularSearchFragment) SmartDialSearchFragment(com.android.dialer.list.SmartDialSearchFragment) SearchFragment(com.android.dialer.list.SearchFragment)

Aggregations

FragmentTransaction (android.app.FragmentTransaction)1 DialpadFragment (com.android.dialer.dialpad.DialpadFragment)1 ListsFragment (com.android.dialer.list.ListsFragment)1 RegularSearchFragment (com.android.dialer.list.RegularSearchFragment)1 SearchFragment (com.android.dialer.list.SearchFragment)1 SmartDialSearchFragment (com.android.dialer.list.SmartDialSearchFragment)1