I used SherlockActionBar
in my application, but after I began to use appcompat. And get error
"The method startActionMode(ActionMode.Callback)
in the type Activity is not applicable for the arguments (PageFragment.ActionModeCallback)
"
in the raw
mActionMode = getActivity().startActionMode(new ActionModeCallback());
Help me please, what I do incorrect?
Just to improve readability, according to user3176367, the solution was to cast the result of getActivity
to ActionBarActivity
.
Here is the working code:
((ActionBarActivity) getActivity()).startSupportActionMode(new ActionModeCallback());
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