1

How can I change the color of bar-shadow, title text and progress bar like in the Android app for Twitter(https://i.stack.imgur.com/SJT3v.jpg) or Telegram (https://i.stack.imgur.com/8O20D.jpg)?

This is my app(https://i.stack.imgur.com/5AOpq.jpg)

I can't add tag meta to html. How can I do it without using a tag?

CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
            builder.setToolbarColor(ResourcesCompat.getColor(getResources(), R.color.blue, null));
            builder.enableUrlBarHiding();
            CustomTabsIntent customTabsIntent = builder.build();
            customTabsIntent.launchUrl(this, Uri.parse(url));
Mariana
  • 1
  • 2
  • 11
mario
  • 632
  • 1
  • 7
  • 16
  • https://stackoverflow.com/a/26960753/1359796 – HEDMON May 24 '18 at 05:51
  • Possible duplicate of [How to change the color of header bar and address bar in newest Android Chrome version on Lollipop?](https://stackoverflow.com/questions/26960703/how-to-change-the-color-of-header-bar-and-address-bar-in-newest-android-chrome-v) – HEDMON May 24 '18 at 05:52
  • more info here: https://developer.android.com/guide/topics/ui/look-and-feel/themes – HEDMON May 24 '18 at 05:53
  • @HEDMON i can't add tag meta to html, how i can do it without tag? – mario May 24 '18 at 06:11
  • What are you using? take a look here: https://stackoverflow.com/questions/32533069/how-to-change-a-title-color-in-chrome-custom-tabs – HEDMON May 24 '18 at 06:49
  • i'm using customtabsintent – mario May 24 '18 at 07:19
  • Chrome automatically generates the statusbar color from the toolbar color. The code can be seen here: https://github.com/chromium/chromium/blob/2baea13a7f0311b6327071333801dea01dcf1a0f/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java#L363-L364 – andreban May 25 '18 at 20:57
  • You guys are not talking about the same thing. The question refers to the Android's lib Chrome Custom Tabs https://developer.chrome.com/multidevice/android/customtabs – gusgol Mar 12 '19 at 20:14

1 Answers1

0

set bar-shadow color is impossible, you can set color bar and they will be filled with solid, but not all colors. I found only 3 solid colors: white(#ffffff) like twitter, black(#000000) and blue(#4d7f9e) like telegram.

mario
  • 632
  • 1
  • 7
  • 16