问题
I need to set Android status bar semi-translucent with a color like tint effect on iOS 7, i've reviewed the documentation, but it only explains how to get a gradient translucent status bar.
I've seen the effect on Samsung Galaxy S5 stock dialer app, so I want to perform this effect. This is the effect:
For example this is an example app that show an effect similar that I want to make, but instead a gradient to transparent I want the whole status bar with solid color behind the solid semi translucent status bar:
https://play.google.com/store/apps/details?id=com.readystatesoftware.systembartint.sample&hl=es
Any help would be great. Thanks in advance.
回答1:
Have you tried to set color over the pattern #OORRGGBB?
Example: #50ff0000. The first two numbers are the opacity.
Anyway, I've found this project that might help you.
https://github.com/jgilfelt/SystemBarTint
回答2:
I am pretty sure that the samsung dialer app gets root permissions because it's a system app. To set a flat background, you would either need root permission or somehow simulate a samsung app to gain access. I think the gradient is your best option.
You could also set your app to full screen and simulate fake system bars that change based on the device so that they look the same as the normal ones, but that would take a lot of time to make.
来源:https://stackoverflow.com/questions/24357782/statusbar-translucent-with-tint-on-kitkat