- I have an activity *AA* which contains a *SearchView* in the action 
   bar menu.
   - And I have a fragment *BF* which has OptionsMenu;
   - the problem is that the *SearchView* works fine at first, but when I 
   show the fragment BF, the*SearchView* does not work properly any more, 
   it let me to enter text but it does not show suggestion list, and does not 
   provoke *onNewIntent()*.

So Did I miss something? Or Is this a bug?

PS. I'm testing using a device with Android version 5.1.1.

XML:

<item android:id="@+id/action_search"
    android:title="@string/action_search"
    android:icon="@drawable/action_search"
    app:showAsAction="always|collapseActionView"
    app:actionViewClass="android.support.v7.widget.SearchView"
    android:orderInCategory="0"/>

Java:

class AA extends ActionBarActivity { //android.support.v7.app
    void showBF() {
        BF bf = BF.newInstance();
        FragmentTransaction transaction = 
getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.container, bf, "bf")
            .addToBackStack(null)
            .commit();
    }}class BF extends Fragment {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setHasOptionsMenu(true);
    }        }

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/07cb0e6a-448c-4ad2-b9a1-c14cca567819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to