6

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)

enter image description here

Arthur Melo
  • 454
  • 5
  • 13
  • 1
    Possible duplicate of [How do I show text in android system status bar](https://stackoverflow.com/questions/45376300/how-do-i-show-text-in-android-system-status-bar) – urgentx Jun 26 '18 at 04:23
  • @urgentx well , I checked you link and he didnt faded out other status bar icons, like mobile network , notification icons on the left. I think that TelegramX are using some trick to do this effect but I didnt get yet – Arthur Melo Jun 26 '18 at 04:46
  • 1
    Good point. Looks like an overlay with alpha 1 over parts of the status bar that they wanted to hide, and no overlay/overlay with alpha 0 on parts of the status bar they wanted to keep showing. – urgentx Jun 26 '18 at 04:51
  • 1
    Hey, I have found a lib to help you. Check this one https://github.com/fede87/StatusBarAlert?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7037 – LMaker Jul 17 '18 at 18:19
  • @LMaker please post this link as answer , I will close the question ;) – Arthur Melo Jul 18 '18 at 16:01
  • done! hope it helps – LMaker Jul 18 '18 at 19:01

1 Answers1

3

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.

LMaker
  • 1,444
  • 3
  • 25
  • 38