I have recently taken the ABS4.0 dive. However, I appear to be having an issue using the MenuInflater.
When using the getMenuInflater() method, I receive an error message stating: "Type mismatch: cannot convert from android.view.MenuInflater to com.actionbarsherlock.view.MenuInflater"
So, it looks like the definition is picking up the ABS version of menu inflater but the getMenuInflater() method is returning the base Android version. Code below:
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu, menu); return super.onCreateOptionsMenu(menu); }
Anyone able to tell me what I'm doing wrong here? Would be much appreciated!
Try changing getMenuInflater()
to getSupportMenuInflater()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With