Skip to content

Commit

Permalink
feat: make navigation bar transparent only on V and above
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
  • Loading branch information
NextAlone committed Feb 4, 2025
1 parent ab62992 commit 95c2ef9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1005,13 +1005,11 @@ public void onViewDetachedFromWindow(View v) {
}
BackupAgent.requestBackup(this);

getWindow().setNavigationBarColor(Color.TRANSPARENT);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
getWindow().setNavigationBarContrastEnforced(false);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
getWindow().setDecorFitsSystemWindows(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
getWindow().setNavigationBarColor(Color.TRANSPARENT);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().setNavigationBarContrastEnforced(false); // Need Android Q
getWindow().setDecorFitsSystemWindows(false); // Need Android R
}
}

Expand Down

0 comments on commit 95c2ef9

Please sign in to comment.