Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent Navigation bar #2747

Open
shuvashish76 opened this issue Aug 23, 2021 · 31 comments
Open

Transparent Navigation bar #2747

shuvashish76 opened this issue Aug 23, 2021 · 31 comments
Assignees
Labels
Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty. Issue-Feature A feature request or improvement. Issue-Task (low) This isn't a bug, but should be dealt with.

Comments

@shuvashish76
Copy link
Contributor

With dark theme
Screenshot_2021-08-23-08-54-45
Screenshot_2021-08-23-08-55-28

With light theme
Screenshot_2021-08-23-08-57-04
Screenshot_2021-08-23-08-58-00

Comparison vs MaterialFiles

Currently we do have Colored Navigation bar option but colors are solid colors. Colored Navigation bar with option to choose from solid/transparent color would be nice. Transparent navigation bar looks modern imo.

@EmmanuelMess EmmanuelMess added Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty. Issue-Feature A feature request or improvement. Issue-Task (low) This isn't a bug, but should be dealt with. labels Sep 5, 2021
@EmmanuelMess EmmanuelMess changed the title [Feature Request] Transparent Navigation bar Transparent Navigation bar Sep 5, 2021
@abdullah951
Copy link

Hi, I would like to work on it.

@TranceLove
Copy link
Collaborator

@abdullah951 Please do.

@ashway171
Copy link
Contributor

Hey, could I work on it if it's open yet. Would be amazed to do so!

@VishalNehra
Copy link
Member

Hey, could I work on it if it's open yet. Would be amazed to do so!

Sure.

@ashway171
Copy link
Contributor

Thanks for helping out. New to open source by the way. So are you going to make me a contributor or something. Or what do you suggest I should proceed with.

@TranceLove
Copy link
Collaborator

@ashway171 Just fork the repo and you may start right away.

Please base your work on the release/3.7 branch.

@ashway171
Copy link
Contributor

Okay sure.

@ashway171
Copy link
Contributor

@VishalNehra, @TranceLove could you please guide me to what all things I need to take care of while setting up the project locally since I faced a lot of build issues while running it

@EmmanuelMess
Copy link
Member

@ashway171 please post the build error as a separate issue

@ANUKULJHA1506
Copy link

@ashway171 can you assign me this.

@VishnuSanal
Copy link
Member

can you assign me this.

@ashway171 Please confirm if you're still working on this issue. @ANUKULJHA1506 We'll assign you after their confirmation or if there's no reply.

@ANUKULJHA1506
Copy link

@VishnuSanal ok

@ashway171
Copy link
Contributor

can you assign me this.

@ashway171 Please confirm if you're still working on this issue. @ANUKULJHA1506 We'll assign you after their confirmation or if there's no reply.

Yeah, I'm on it... Just some errors and we are good to go

@VishnuSanal
Copy link
Member

Yeah, I'm on it...

Okay, so I think @ANUKULJHA1506 can look into other good first issues :)

@malik0011
Copy link

Hey, is it still open? I would like to work on it!

@VishnuSanal
Copy link
Member

Hey, is it still open? I would like to work on it!

Yes, and feel free to do!

@VishnuSanal
Copy link
Member

@malik0011 Any updates here?

@Trust04zh
Copy link

Hi, I'd like to work on this issue if nobody working on it.

@VishnuSanal
Copy link
Member

Hi, I'd like to work on this issue if nobody working on it.

@Trust04zh Sure, please do.

@VishnuSanal VishnuSanal assigned Trust04zh and unassigned malik0011 Mar 11, 2022
@mohit-2003
Copy link

I don't understand what is the issue, can you please explain it?
what i have to do ?

@VishnuSanal
Copy link
Member

I don't understand what is the issue, can you please explain it? what i have to do ?

@Trust04zh is working on this as of now. @mohit-2003 can take this over if @Trust04zh is not working on this anymore.

@Trust04zh
Copy link

I'm currently still working on this and try figuring out how to apply transparent navigation bar with the original UI designing, I am not so familiar with Android UI designing, the process may be kinda slow.

@VishnuSanal
Copy link
Member

VishnuSanal commented Mar 23, 2022

Okay, so I think @mohit-2003 can look into other good first issues :)

@shuvashish76
Copy link
Contributor Author

@Trust04zh

how to apply transparent navigation bar with the original UI designing

Screenshot_2022-03-23-18-57-30

Currently

  1. when that option is on it follows Primary Color (Left Tab) or Primary Color (Right Tab) color.
  2. when that option is off it use pure black color (doesn't matter which Theme you pick, even for Material Light theme it's black)

My suggestions

  1. Keep it as it is.
  2. [New*] Instead of pure dark change it to transparent

Sorry for not mentioning these details in my comment.

@Trust04zh
Copy link

Trust04zh commented Mar 23, 2022

@shuvashish76 Thank you for your patient explanation!

I noticed the facts just as you describe about the current behaviors (also I think the behavior when turning off may not be as expected, as the original color is not always black, this might be another issue), while I wonder if it would be better to add an independent option for setting transparent navigation bar, as the "Colored Navigation Bar" setting sounds not for setting the navigation bar to be transparent or not, I think.

So I think there might be another checkbox below "Colored Navigation Bar" to set the navigation bar to be transparent, I would be thankful if you could share your opinion with me.

And What I'm currently figuring out is about the code implementation for this feature, simply set an transparent argb color with api Window.setNavigationBarColor won't set a truly transparent color, and I'm reading references and testing to let it work.

@shuvashish76
Copy link
Contributor Author

the behavior when turning off may not be as expected

Agreed, but for example by default Material Files show transparent navigation bar & no special settings to turn that off/on. So why not follow same behaviour for Amaze (off/transparent by default)?

better to add an independent option for setting transparent navigation bar

  • I like Amaze's minimal & organised settings & IMO another setting just for that is unnecessary.
  • Ok what would be the navigation bar color for Amaze, if you turn off both Colored Navigation bar & Transparent Navigation bar? Black?

@Trust04zh
Copy link

Trust04zh commented Mar 24, 2022

Sorry for my late reply.

Ok what would be the navigation bar color for Amaze, if you turn off both Colored Navigation bar & Transparent Navigation bar? Black?

System default color, white for light theme while black for dark theme, which are the colors you launch Amaze with corresponding system theme and with Colored Navigation bar disabled, I guess this might be the expected behavior than simply black.

I like Amaze's minimal & organised settings & IMO another setting just for that is unnecessary.

I agree that another option can be unnecessary, while I'm not sure if it is ok if there's no option for "solid and system default navigation bar color".

@Trust04zh
Copy link

some report for my process:

I implemented transparent navigation bar by modifying styles so that navigation bar color become transparent, and enabled some flags to allow views to draw under system bars, but I still need to specify what should be drawn under system bars and what should not, or it will simply be like this.

图片

I've found some advises about using windowInsets to control the layout to solve this, also I read some source code of MaterialFiles and it seems that it use windowInset and padding to control the layout, while I didn't finish it yet.

@VishnuSanal
Copy link
Member

@Trust04zh Are you still working on this?

@Trust04zh
Copy link

@VishnuSanal
No, I didn't find an easy approach to implement this feature.
Two references that maybe helpful:
For transparent system bars
https://medium.com/androiddevelopers/gesture-navigation-going-edge-to-edge-812f62e4e83e
For only draw behind status bar (so can navigation bar)
https://stackoverflow.com/questions/68451704/transparent-status-bar-with-visible-navigation-bar#68492550

@Trust04zh Trust04zh removed their assignment May 3, 2022
@PK284
Copy link

PK284 commented May 2, 2023

If anybody is not assigned to this Can I solve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty. Issue-Feature A feature request or improvement. Issue-Task (low) This isn't a bug, but should be dealt with.
Projects
None yet
Development

No branches or pull requests