-
-
Save mediavrog/9345938 to your computer and use it in GitHub Desktop.
use mPopup.setPresenterCallback(this); instead
@kimcy929
@abaxxx
Thank you so much.
@tuinui
Thank u so much.. worked like a charm.
Thank you so much. @tuinui
How to remove the empty space if we are not using the text??
Support v7 MenuPopupHelper
is now hidden and restricted to LIBRARY_GROUP 😢
More details here:
https://stackoverflow.com/questions/44969577/support-v7-menupopuphelper-is-now-hidden-and-restricted-to-library-group
@miankhalid Did you found a work around. MenuBuilder and MenuPopupHelper both are now restricted to LIBRARY_GROUP
Seems like the only way to use it currently is through reflection https://resocoder.com/2018/02/02/popup-menu-with-icons-android-kotlin-tutorial-code/
Thank you! Works perfectly! Heads up for those using appcombat v7:23.1.1 and up, they changed the packages slightly.
import android.support.v7.view.SupportMenuInflater; import android.support.v7.view.menu.MenuBuilder; import android.support.v7.view.menu.MenuPopupHelper; import android.support.v7.view.menu.MenuPresenter; import android.support.v7.view.menu.SubMenuBuilder;
Just remove .internal from there :)
And now, you replace import android.support.v7
with androidx.appcompat
import androidx.appcompat.view.menu.MenuBuilder;
import androidx.appcompat.view.menu.MenuPopupHelper;
import androidx.appcompat.view.menu.MenuPresenter;
import androidx.appcompat.view.menu.SubMenuBuilder;
Exactly. Appcompat 24.0.0 mPopup.setCallback can't invoke.