-->

Android chrome custom tab customizable

2019-07-27 21:37发布

问题:

in how far is the chrome custom tab customizable? We are programming a app which is loading a webview in a fragment with an own header (action bar) and footer. Is custom tab loading in full screen or is their any way to load a chrome custom tab with a margin or something like that? To change the action bar title or color is not enough for our plan.

Also i want to know about a way to display css3 properly in android versions without chromium (above android version 4.4 as far as i know).

Thank you in advance.

回答1:

The Custom Tabs Activity takes the whole screen, but it's is possible to customize the Toolbar (header) and, on most recent versions, to add a Bottom Toolbar (footer).

Here's a list of customizations possible with Custom Tabs:

  • Custom Toolbar color
  • Adding an Action button to the Toolbar
  • Adding Menu Items to the overflow menu
  • Custom Back button icon
  • Custom start/exit animations

In the version 23.2.0 of the Custom Tabs support library, the following customizations have been added:

  • Adding up to 5 Action buttons to a bottom toolbar
  • Custom color for the bottom toolbar
  • Adding a default Share action to the overflow menu.

There are samples on how to implement each of those customizations on the Github Demo