In android i am trying to add multiple images and multiple text in a single button here is a image link to what i am trying to do. "http://imgur.com/0U7hMGw"i would love and appreciate any help on this i can get. Also to get the Circle images i was think of just using a drawable is the the best thing to do? I don't know how to make the image/profile picture to be a circle because when i add the drawable it adds it to the whole button not just the profile picture. Thank you very much for your help!
There's no need to set multiple images to a button. You can have a RelativeLayout with those images/texts, and set an OnClickListener to the RelativeLayout itself.
Related
so I'm looking for a solution where I can add new imageviews, and when I remove one, the rest adjust.
I've included a poorly drawn example of what I mean - when we remove the "man" imageview, everything else shifts to the left. I'm pretty new to Android development so I'm not sure if this is possible/what type of layout I would need/which terms to search. Any help would be appreciated!
before removal: https://i.stack.imgur.com/bTbrM.png
after removal: https://i.stack.imgur.com/LBJrH.png
Simply just use the GridView for this. Update the records when you take the action for deleting the item from the GridView, and make it notified your GridView can automatically make it for you.
if you are about just put them and remove one photo by clicking button so its simple .. but I 'm not sure what you want exactly ... any why if this is the case you can but the images pathes in an Array int[] imagesArray = {R.raw.firs_img, R.raw.second_img .....} and set the photos imgView1.setImageresource(imagesArray[varieble]) by clicking a button you can change the variable so you can change the photo
you can give the code to help you better abd give us more infrmation about wha tyou want to do
I've designed some buttons with photoshop but now it came in my mind the problem on how make them work.
Basically I've this image
I've thought about two solutions: the first one is to place them in a RelativeLayout and place them with "lot" of padding/margin work, the second solution is to cut them vertically and attach them one by one, like this:
In the second solution I cannot probably use selector, not on all the button at least, not a big issue btw. With the first one I'm a bit worried about scaling on different screen sizes.
It will be a problem? Which solution would you suggest?
Thanks in advance.
Its not a must that your clickable area should be the same shape as your image shape..
Change the Image onclick...
If your options are open to use an image view instead of button, Then the whole image will be clickable.
I searched all over to find this question similar to yours.. Hope it helps.
I am creating one application , in that application i used background for button . Background image has outer glow, so when i set that image to button background it shows me black color instead of outer glow image .
How can resolve this issue ? Please help me to solve this.
Here i add two images .
1) Image in which i got problem of outer glow.
2) Actual image used in button background.
heres a link that explains different button presses a good clear explanation
http://eagle.phys.utk.edu/guidry/android/AnimalSounds.html
I have a very simple widget that has a background image of a speech bubble and an imageView that contains a character standing next to it (as if he is saying something).
On top of the speech bubble i have a textView in which i show some text.
Basically all i want to do is so that when the user clicks on the character the image changes to show an animation of the character.
I did a simple app that animates an imageView (using the animation-list xml) when the image is clicked and that worked fine. So i was wondering if i could achieve the same thing with this widget.
I have seen some examples where by you can click on a widget (be it a button, image, whatever) and you can then load a config layout however i simply cant figure out and i cant find anywhere if what i want can be done.
So basically what i need to know is:
1. can a widget have an animated imageView
2. What do i need to do so that when the imageView is clicked it loads the animation?
Can anyone point me in the right direction please?
Thanks in advance guys!!
Have you tried to use LayoutAnimation? See the related question here:
Android Widgets: Animations on RemoteViews ?
Hey team i am new to android
and building an application in which there would be two buttons one for setting and the other for use mirror. Now when i will click on use mirror button , the color of the screen should become silver ,so that any one can use it as a mirror......
so plz help me to solve the problem
thanks
This is pretty simple. Use a ImageView and two buttons and change the image of the ImageView depending your button presses. A scaled 1x1 pixel image in the color you like should be sufficient.
If you don't know how you can implement what I just said, you should start reading some basic tutorials. This is pretty basic stuff so work with some tutorials before writing your own application (even if it is so simple)