In my application I request a determinate progress bar using:
this.requestWindowFeature(Window.FEATURE_PROGRESS);
It works well but the bar does not span to the edges of the screen (see below picture). What could I do to fix this?
I compile against API v22 and I am not using appcompat.
I do not know for sure if this will resolve it or if it does, it is the perfect way to do it. I had a similar problem and i had used a negative layout_margin like below
android:layout_marginLeft="-22dp"
android:layout_marginRight="-22dp"
for the progress bar
You could try and see if this helps;-)
Related
I am using API 22 and want to add shadows to my progress bar and toolbar, but my first focus is on the progress bar. Is it possible to do this? If so, how?
I tried using the shadow attributes, but those didn't seem to work.
Here is an example of what I want the progress bar to look like:
Link: https://i.stack.imgur.com/m1rd7.png
It has a nice slight shadow above and below it.
Currently I'm using a CardView with a child ProgressBar.
I am currently building an app that uses the material design theme as a base theme.
However the action bar has a dark shadow below the action bar.
I have tried everything I can think of, but I can't seem to get rid of it.
Here is a screen shot showing what I mean:
https://docs.google.com/file/d/0B_krkpxyd558V0p6a1NKZXFHeHc/edit?usp=docslist_api
If someone could tell me how I can get rid of it, I would much appreciate it.
Thanks
Corey :)
Shadow is created by using elevation, here's how you can disable it programmatically:
getActionBar().setElevation(0);
If you have ever played 7x7 you've surely noticed the ActionBar changing his background progressively with your points until a new level is reached.
I really like the effect and I was thinking to use it somewhere. Do you have any clue on how implement it?
I'm not sure if it could be achieved drawing a Rect over it, any help?
Thanks in advance
This is my game! I actually made a custom Action Bar that was transparent and added the level progress bar underneath it.
If you wanted to use the default Action Bar, you could probably do the same with windowActionBarOverlay.
I want to know, how Google does this.
I read much articles, but none of the given solutions works for me.
I dont want the Actionbar to be Transparent. I dont want to Hide the Actionbar. I dont want to Overlay the Actionbar with an ImageView like this:
https://docs.google.com/file/d/0B0T-2P7o0EFsMGF1Y2s5RjdjdUk/edit
https://docs.google.com/file/d/0B0T-2P7o0EFsQXQ3bU1kT1VPQ1E/edit
As you see in the background, the Actionbar layout isnt moved upwards, so i guess that the ActionBar is still behind the Image.
You should have no problem covering the action bar using a dialog, that's part of the reason why they exist.
There's a similar answer here with an example.
I'm now customizing theme through some framework files. The problem is that I've made the status bar with transparent background. But there's an obvious side line between status bar and the application. How can I merge them together? Looks like the application align to the top of the screen but the status bar also exist.
Thanks in advance.
Please find WindowManager.LayoutParams.TYPE_STATUS_BAR in StatusBarService.java and replace it with WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY.
I think it is what you want.