Can any one tell how to implement RecyclerView Contextual Action Bar on long tap of listItem Selection on xamarin android?
标签:
xamarin.android
相关问题
- Custom controls disabled. There was an internal is
- Error:Xamarin.Forms targets have been imported mul
- Detection of swiping on a normal Android Activity
- How to use PreferenceFragmentCompat in the prefere
- Wrong Yes/No text using Android Resource String
相关文章
- Xamarin form MessagingCenter Unsubscribe is not wo
- The type initializer for 'SQLite.SQLiteConnect
- How to use native C++ libraries in Mono for Androi
- Xamarin build error: defining a default interface
- Xamarin Android Player Error when attempting to fi
- Can Android Studio and Visual Studio safely share
- Android Webview cannot render the pdf sometimes an
- Prevent Orientation change in Xamarin Android Appl
Take Xamarin Official RecyclerViewer for example, you can follow the below steps to implement a contextual action bar on the recyclerview:
Create a simple menu resource for your action bar(
Resource/menu/ContextualMenu
):Create a class(
MyActionMode
) implementsActionMode.ICallBack
:In
PhotoViewHolder
modify the constructor to accept a long click action:Modify
PhotoAlbumAdapter
like this:In
MainActivity
change the creation ofPhotoAlbumAdapter
to use the newly created constructor:Here is the complete modified demo.