Cannot make the Actionbar transparent
See original GitHub issueDid you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?
Yes
Tell us about the problem
Please, ensure your title is less than 63 characters long and starts with a capital letter. I am not able to achieve the transparent actionbar. I tried all the code shared here at github and on stackoverflow but it doesn’t work.
Which platform(s) does your issue occur on?
iOS/Android/Both
Please provide the following version numbers that your issue occurs with:
- CLI: 3.1.3
- Cross-platform modules: 3.1.1
- Runtime(s): tns-ios = 3.1.0
│ nativescript │ 3.1.3
│ tns-core-modules │ 3.1.1
│ tns-android │ 3.1.1
│ tns-ios │ 3.1.0
Please tell us how to recreate the issue in as much detail as possible.
Just create new project, and apply following code.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Yes. Check following:
ngOnInit() {
//ios back for titlebar - https://www.nativescript.org/blog/how-to-match-a-nativescript-actionbar-s-color-on-ios
if (topmost().ios) {
topmost().ios.controller.backgroundColor= UIColor.clearColor;
var navigationBar = topmost().ios.controller.navigationBar;
navigationBar.setBackgroundImageForBarMetrics(UIImage.new(), UIBarMetrics.Default);
navigationBar.translucent = false;
navigationBar.shadowImage = UIImage.new();
navigationBar.backgroundColor = UIColor.colorWithRedGreenBlueAlpha(0.20,0.20, 0.20, 0);
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to set actionbar transparent background - Stack Overflow
I have searched some articles about how to set the actionbar background transparent but it doesn't seem to work for me.
Read more >No Action Bar & Transparent Status Bar - YouTube
Tutorial how to hide action bar and make transparent status bar in Android Studio.
Read more >How to make action bar transparent in Android studio - Quora
Why to make Action Bar Transparent if u could just remove it. Remove it from style that you will find in the value...
Read more >Make Action Bar Transparent - Jay Rambhia
I have been working on an app which produces long exposure effect. As of now, we are almost ready with the free version...
Read more >Transparent Action Bar in custom themes? : r/Telegram - Reddit
After trying a bit, I just got it to work, just had to create a brand new theme based on Night Theme, not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
you can move the code lower in the lifecycle
@dotnetdreamer Here’s an example of working code. It’s a custom widget for NS Core, but you can adapt it for your needs.