Unable to override onCreateOptionsMenu in ListFragment

后端 未结 10 1718
太阳男子
太阳男子 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:26

    Try this, actually IDE got confused bw native menu import and Sherlock import..so if we specify it clearly then it will be resolved..

    @Override
        public void onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu,
                com.actionbarsherlock.view.MenuInflater inflater) {
    
    }
    
    @Override
        public boolean onOptionsItemSelected(
                com.actionbarsherlock.view.MenuItem item) {
            // TODO Auto-generated method stub
    
    }
    

提交回复
热议问题