Unable to override onCreateOptionsMenu in ListFragment

后端 未结 10 1713
太阳男子
太阳男子 2020-12-24 06:56

I created an app that supports both phone and tablet version so i use the android-support-v4.jar library.

My activity extends the ListFragment and I tried to overri

10条回答
  •  星月不相逢
    2020-12-24 07:12

    Just had the same issue in an activity on Xamarin. it was expecting the method to take Xamarin.ActionbarSherlockBinding.Views.IMenu as an argument.

    How to find out: -Comment the OnCreateOptionsMenu method You started to implement. -In some working method start typing OnCreateOptionsMenu like You want to call it. -Choose it from the suggestions list. -Place a cursor on OnCreateOptionsMenu call. -press Command+d to go to assembly browser. You will see the interface from implementation. -Then by pressing mouse pointer on the parameter type it takes You will get to the interface of this type implementation. -And You will see namespace it is in.

提交回复
热议问题