I have followed a gallery tutorial and have it working fine, but the problem that I need help solving is that I want to change the background colour of the gallery. If I just use:
setBackgroundColor(Color.BLACK);
then it messes up and I lose the border also. I want to keep the border, but change the colour from the default grey. I've also tried using different resources such as:
R.styleable.gallery1_android_colorBackground
but that also does not work. Does anyone have any idea how to solve this?
Cheers
In your getView() from your ImageAdapteradd the following attribute:
imageView.setBackgroundColor(Color.BLACK);
Hope this help.
Related
I need some help in modding apk of PicsArt. I have trouble seeing my transparent pictures in this window here that is the first editing mode when you entered PicsArt. I've successfully changed the background of number 1, as you can see, it was supposed to be dark/black but I changed it to this color code : #eeeeee the code was from colors.xml, you can find that in folder res/value/colors.xml then I changed it to #eeeeee.
Now I really need a help to change the color of number 2. FYI: it's not the picture that has color of black, but it's my transparent picture that shows in black color. I really hope someone could help me to change the color be like in the draw mode, you can see that window has checker-board pattern as the background.
Or if it's not possible it is alright for me to change just the color of it, example grey color.
I've tried myself to change and find some other color codes, but I keep failing to find and change that color. I'm using the latest version of PicsArt, you can download it for free on Play Store. I hope some experts in modding APK will come out and help me, it will be very helpful for me to make my work easier just using my phone.
EDIT : I've uploaded the colors.xml code somewhere click here to see ,
but I dont think any of these code will work for the background colors that I've talked above, because I've tried to change every of it and I failed. I think it's somewhere else in the other folder that contains xml files. please help me
I intend to do this exact thing:
I tried layers as background, I even tried to do this programmatically, nothing gives me the desired look. Please help.
In my app i need to create cardview with curved top and bottom lines, like this:
I tried to search answer on stackoverflow and google but i haven't found anything. Also i tried to make it via xml, but i couldn't.
Can anyone help me with this? I can't use it like image background because i need to change background color when i click on card and i have a lot of such card in my recyclerview and a lot of different colors for every card.
Thx.
You need to use a custom shape a la this as the background of the view. edit see this post
I'm trying to use a listview in my application with a gradient from the bottom.
I do not want to use the gradient in the background, I like to use it in the listview.
To try to explain better, I attached a picture of what I want.
The background will show images that will change.
I searched a lot and made several tests, but without success.
I appreciate any help.
Thanks and regards
Android has something built in for that. It is called fading edge. The two XML properties are android:fadingEdgeLength and android:requiresFadingEdge. If you were hoping to have the image gradient change, I don't think they are dynamic.
I am somewhat of a new android developer and have a question regarding changing the background dynamically at runtime.
What I want to do is set a background color in a LinearLayout Tag, and later change that background color in my activity class. This code below is not working. Am I missing something or is this the wrong approach for trying to change the background color in a linear layout
LinearLayout lv = (LinearLayout)findViewById(R.id.ChoiceLayout);
lv.setBackgroundColor(0x000080);
Thanks in advance
First thing I've noticed is that your color has ALPHA = 0x00. Which makes it transparent. Try changing to
lv.setBackgroundColor(0xFF000080);
AFAIK, that should work fine. Use hierarchyviewer to try to diagnose what is going wrong.
already answered in another post , unfortunately i don't know that link but know the solution.
use
lv.setBackgroungColor(GetResources().getColor(int color));