Example usage for android.app Activity DEFAULT_KEYS_SEARCH_LOCAL

List of usage examples for android.app Activity DEFAULT_KEYS_SEARCH_LOCAL

Introduction

In this page you can find the example usage for android.app Activity DEFAULT_KEYS_SEARCH_LOCAL.

Prototype

int DEFAULT_KEYS_SEARCH_LOCAL

To view the source code for android.app Activity DEFAULT_KEYS_SEARCH_LOCAL.

Click Source Link

Document

Use with #setDefaultKeyMode to specify that unhandled keystrokes will start an application-defined search.

Usage

From source file:com.todoroo.astrid.activity.FilterListFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    // We have a menu item to show in action bar.
    setHasOptionsMenu(true);/*from   w w w. j a  va 2s . c  om*/

    getActivity().setDefaultKeyMode(Activity.DEFAULT_KEYS_SEARCH_LOCAL);
    //ImageView backButton = (ImageView) getView().findViewById(R.id.back);
    newListButton = getView().findViewById(R.id.new_list_button);

    if (newListButton != null)
        newListButton.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = TagsPlugin.newTagDialog(getActivity());
                getActivity().startActivityForResult(intent, REQUEST_NEW_LIST);
                if (!AndroidUtilities.isTabletSized(getActivity()))
                    AndroidUtilities.callOverridePendingTransition(getActivity(), R.anim.slide_left_in,
                            R.anim.slide_left_out);
            }
        });

    AstridActivity activity = (AstridActivity) getActivity();
    if (activity.getFragmentLayout() > AstridActivity.LAYOUT_SINGLE) {
        mDualFragments = true;
        mSelectedIndex = activity.getIntent().getIntExtra(TOKEN_LAST_SELECTED, 0);
    }

    setUpList();

    if (mDualFragments) {
        getListView().setItemsCanFocus(false);
    }
}