Status Bar sensitive information like Telegram X

2019-03-28 15:49发布

问题:

I`m digging for many days and didn't found the information about this functionality that presents in Telegram X (newest version which the source code isn't opened yet, running on nexus 5x api 27 emulator)

When application is in "waiting for network" , this information appears inside your translucid status bar, like this gif.

My questions is, how could I achieve this? Sounds like they are using some kind of context to hide content inside status bar (look at notification icons and mobile network icons, they hide when the msg slide from top)

回答1:

I found a third party library who can help you to archieve your question.

Check this repo https://github.com/fede87/StatusBarAlert

What is this? This is a small library inspired by Telegram X status bar new alert, written in Kotlin. It shows custom message with optional indeterminate progress in status bar area.