Chrome Custom Tabs: Icon State and Response to User Actions
It looks like the custom tab icon is static so it can't react to user changes or external changes?
To take the example of Pinterest, if Pinterest has a custom tab icon like "Pin It" and the user clicks on it, it can be changed to "Pinned". If not, how does the app / tab provide feedback to the user after such an action?
+3
source to share
2 answers
This feature is now available in Chrome 46 ( https://codereview.chromium.org/1291083004/ ) along with the next version of the Android Support Library to be released shortly.
There are two ways to update the action button icon:
- Using the support library, you can call CustomTabSession # setActionButton () as soon as you have a CustomTabSession object after creating a custom tab.
- If you prefer not to use a nice and nice support library, you can also achieve the same goal by binding to CustomTabsService , call updateVisuals () and pass the IBinder object you got earlier when binding.
+1
source to share