I'm trying to make a menu with buttons, and my problem is that i want this menu to be over a camera view (I'm working on Augmented Reality).
But if I make my menu appear it makes the background black instead of having the video of my camera.
Any ideas how to make this background transparent? I tried with :
menu.setBackgroundColor(Color.TRANSPARENT);
but there is no modification :/...
OK. Then you can change the background of the menu as any transperent image. Or you can change the theme in Manifest file to black so that can shows the white background in your Application
Try: menu.setBackgroundColor(Color.alpha(0));
Related
I have being playing around with the ListView of XYPlots. I was able to change background either by using style="#style/APDefacto.Light" or style="#style/APDefacto.Dark". These two work well but, I want my graph to have complete white background instead of a light or dark background.
Screenshot with the light background.
If you look carefully at the graph, you will see that the background has a grey color but the graph itself is white. I want the whole background to be completely white.
I have try the solution of the link Change the background color of XYplot in android to white?. But that only have the effect of removing the square on the graph but no change is seen on the background.
Below is the resulting screenshot.
Any clues,
Thanks.
Just add these attrs to your XYPlot's xml:
ap:backgroundColor="#FFF"
ap:graphBackgroundColor="#FFF"
How do I style my PopupWindow in Android with a white background but still keep the shadow? I am trying to create something like [this][1]:
By default, my PopupWindow has a dark background. So I set the popup window's contents to have a white background which gives me this:
Which has a shadow but still has the black "border" which really is just the uncovered parts of the popup window background.
So I try and set the popup window background to white with:
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.WHITE))
which causes this:
which gives the correct background colour but also removes the shadow.
So is there any easy way to keep the shadow but set the background as white. Is there something else I should use instead of PopupWindow to create what I want? Or do I have to use a 9 patch or something?
I just ended up using a 9 patch created with http://inloop.github.io/shadow4android/
after set background,just add elevation.
popupWindow.setElevation(10);
this will work after API21.
If nothing works, you can use below code. This will place a shadow around Popupwindow with white background. I've tested it in my app.
popupWindow.setBackgroundDrawable(context.getDrawable(android.R.drawable.picture_frame));
I am working on a bottom toolbar for android by forking the SlidingUpPanel at:
https://github.com/umano/AndroidSlidingUpPanel
I want to make it always on top of every thing not defined in my sliding up panel. But when I slide it up, if there is something behind it, my layout is acting like it's transparent. How can I fix it to act like a real toolbar ?
before sliding :
after sliding :
source : http://www.4shared.com/rar/jeA2gbZy/androidslidinguppanel-master.html
Add a onClickListener to the root view of sliding up pannel.I did that and it works well, hope it works for you too.
Set a background to the button and change text color.
I dont think they are transparent but the text just has the same color and the button has a transparent background by default.
In my Android app, I'm trying to get buttons to be tinted a certain color (either blue, red or gold). The default button tint is grey. Does anyone know how to change the color of the button so that the transparency remains with it?
I tried using:android:background
but that ditches the transparency completely and makes the button one solid color.
I also tried using:android:#color/transparent
but that ditches the color completely in favor of a fully transparent button. I've looked online for a while and found mostly stuff relating to image buttons. The kind that I'm trying to tint is just the standard Button buttons. I'm also guessing that this can be done mostly just through XML. Is that correct?
You could try and create your own button drawable like so...
Take the button drawable from the Android SDK ([ANDROID_SDK_HOME]/platforms/data/res) and import the drawables into your project. Then create a layer list with the button drawable on the bottom and a semi-transparent color on top.
Is there a way to make to change the color of the 3 dots of the menu icon?
I'd like to make them completely white without any transparency but haven't found anything in the android styles/themes?
FYI: I'm using actionbarsherlock.
Thanks in advance :)
this is because they aren't made in the code just search the image com_actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_light.9.png in your drawable directory there you can change the color of this image.