Tạo context menu trong Android – ActionBar ActionMode.CallBack Example

Trong bài viết này mình se hướng dẫn các bạn tạo một Context-Sensitive ActionMode(CAB), đây là một dạng menu hỗ trợ khi bạn gọi đến nó. Ví dụ bạn cần xóa nhiều Item trên một Listview hay cần xóa nhiều Item trên một RecyclerView nó sẽ hiện một  Context-Sensitive ActionMode trên ActionBar giúp giao diện ứng dụng của bạn trông đẹp hơn, hài hòa hơn như hình dưới.

ActionBar ActionMode.CallBack Example
ActionBar ActionMode.CallBack Example

Bạn có thể tìm hiểu thêm về Context-Sensitive ActionMode(CAB) tại đây https://developer.android.com/guide/topics/ui/menus.html?hl=vi#CAB

Project on Github: https://github.com/trongcong/ActionModeCallback.git

Gom Marker trong Android với Google Maps Android API – Google Maps Android Marker Clustering Utility Sử dụng SwipeRefreshLayout trong ứng dụng Android Hướng dẫn tạo Material Dialog Bottom Sheet Android Retrofit và Volley thư viện nào tốt hơn Hướng dẫn sử dụng thư viện Volley trong Android Tạo Web Service bằng PHP và MYSQL cho ứng dụng di động – Part 2 Tạo Web Service bằng PHP và MYSQL cho ứng dụng di động – Part 1 Hàm chuyển đổi Timestamp thành Datetime trong Android và JavaScript Design Patterns là gì? Tạo Project Android theo mẫu Design Patterns(Part 2) Design Patterns là gì? Tạo Project Android theo mẫu Design Patterns(Part 1)

1 thought on “Tạo context menu trong Android – ActionBar ActionMode.CallBack Example

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.