-
Book Overview & Buying
-
Table Of Contents
Android 6 Essentials
By :
As discussed earlier, we have a couple of features integrated into Chrome custom tabs. The first customizes the UI and interaction with the custom tabs. The second allows pages to be loaded faster and keeps the application alive.
Before we start using custom tabs, we want to make sure they're supported. Chrome custom tabs expose a service, so the best check for support is to try and bind to the service. Success means that custom tabs are supported and can be used. You can check out this gist, which shows a helper how to to check it, or check the project source code later on at:
https://gist.github.com/MaTriXy/5775cb0ff98216b2a99d
After checking and learning that support exists, we will start with the UI and interaction part.
Here, we will use the well-known ACTION_VIEW intent action, and by appending extras to the intent sent to Chrome, we will trigger changes in the UI. Remember that the ACTION_VIEW intent...
Change the font size
Change margin width
Change background colour