Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.8 KB

Exercise_7_3_Contextual_Menu.md

File metadata and controls

35 lines (24 loc) · 1.8 KB

Objectives

  • Learn how to provide users a contextual menu.

Requirements

  • Use the existing code from Exercise 7.2.
  • Modify the layout to include a button to bookmark a post. You can choose your own way to store bookmarked posts.

Colored star icon indicates that a post is bookmarked.

Portrait post list

Landscape post list

  • Add the Bookmark menu to the navigation drawer.

Portrait menu

  • Choose Bookmark menu will open a page that list all the bookmarked posts, the UI of this page should be the same as other topics' pages.
  • Long press on an item inside Bookmark page will trigger the contextual menu like this:

Portrait contextual Menu

Landscape contextual Menu

  • Tap on the remove icon will delete all the selected posts from bookmark.
  • All the icons can be downloaded from here (this is the xxxhdpi you can resize for other screensizes if needed)
    • Bookmark BookmarkBookmarkBookmark
    • Bookmark menu
    • Remove icon

References

Bonus:

  • Listview already has a way to handle contextual menu for you, can you find out the way to do that?
  • Find a way to make contextual Menu work with Toolbar.