How to implement the StatusBar effect in a Medium or Telegram X application?… here is a solution to the problem.
How to implement the StatusBar effect in a Medium or Telegram X application?
Medium: before scroll, and after scrolling
Telegram X:normal if you have internet connection and otherwise
As you can see, icons like Wi-Fi disappear; Only the current time and battery icons are retained, but the opacity is 50%.
In addition, this effect is applied using a smooth fade animation.
EDIT: Please check this answer for everyone who needs some information about this question. https://stackoverflow.com/a/49182417/9342948
I searched for a long time and finally found it. It automatically applies fade animations.
View decorView = getActivity().getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);