You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get this to work with fragments - is that possible?
I'm using MVVM and I declare my onCreateOptionsMenu inside a Fragment instead of an Activity.
I've tried a few tactics but I keep running into errors and I feel like there's something I'm not seeing
The text was updated successfully, but these errors were encountered:
bindSearchView is actually an extension function extending either an Activity or ViewGroup. You have two options:
Add it in your activity, where you can show and hide it as you wish after binding. This is what I do, as toolbars are typically linked to activities vs fragment.
Add it to any general viewgroup. Just make sure you call it from that viewgroup. You may need to manually adjust the menu y offset if your viewgroup doesn't fill your parent.
I'm trying to get this to work with fragments - is that possible?
I'm using MVVM and I declare my onCreateOptionsMenu inside a Fragment instead of an Activity.
I've tried a few tactics but I keep running into errors and I feel like there's something I'm not seeing
The text was updated successfully, but these errors were encountered: