Skip to content

Commit

Permalink
feat: make navigation bar transparent only on R and above
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
NextAlone committed Feb 4, 2025
1 parent ab62992 commit d0ecc80
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 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);
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 d0ecc80

Please sign in to comment.