Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

15
Contextual FAB (Navigation Architecture Component)
Post Body

As I understand from the Android docs, your activity with it's App Bar, FAB and menu etc. should stay the same and you only replace your fragments in the main view. When I navigate to a different fragment however I want my activities' FAB to either dissapear (ideally with an animation) or take on a new meaning.

On this page I want the fab to allow users to add a transaction, but when not displaying the portfolio fragment I want the FAB to be contextually useful to the page being displayed:

How would I do this?

Main Activity

Author
Account Strength
90%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
3,195
Link Karma
2,282
Comment Karma
761
Profile updated: 6 days ago
Posts updated: 1 day ago
Android Engineer

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago