Statusbar Translucent with Tint on Kitkat

感情迁移 提交于 2020-01-03 02:27:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!