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.
Related
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 make a widget which is a togglebutton like the ones in the android control widget (the quicksettings for wlan, bluetooth etc.).
Here's how it looks (#Control Widgets)
Does anyone know if this layout is contained in the android sdk or if not how I can make a layout just like that one?
I've already tried some things but I don't know how do to the stroke at the bottom.
Regarding to your issue I searched a little bit deeper.
See: https://developer.android.com/guide/topics/appwidgets/index.html
These are the classes which you can use with an appwidget to implement in your layout there is no such thing like a toggle button, but an imagebutton which I think us exactly what Google is using for the "toggle buttons". Take a closer look on the imagebutton :
https://developer.android.com/reference/android/widget/ImageButton.html
Then you will find out it's exactly what you are looking for.
By default, an ImageButton looks like a regularButton, with the standard button background that changes color during different button states. The image on the surface of the button is defined either by the android:src attribute in the XML element or by thesetImageResource(int) method.
I can't imagine that such a complex layout is possible just using clean xml...
Hope it helps now!
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.
Does anyone know how to get rid of the icon shadow? or at least change its shape? I thought first that it was touchWiz thing, but then I checked other icon and they seem to have different shaped shadows.
Here is the image to clarify what I mean:
and here is the icon I am using:
Just remove the app from the device completely, clean the project and run it again. It has nothing to do with your drawable. I think it is some sort of cache.
I currently got this complex screen to implement the XML code.
I suppose to build with the tablelayout, but i still have no idea how to place the item on the shelf and the wooden background behind that. Could anyone hint me some ways ? Thanks
Set the bitmap as your activity's background drawable. From there, you've got several possibilities. Two that should work are
1) Place transparent Button's on the activity, using an AbsoluteLayout.
2) A couple of people have coded solutions similar to the HTML image map construct, and posted them in public fora. Google "imagemap android" and borrow.