Answer the question
In order to leave comments, you need to log in
How to make a button with a picture and text in android?
How can I make a button and a picture next to it, for example, as in the VK or Instagram application.
I did this:
1) took a picture from here PNG : https://www.google.com/design/icons/
2) created a regular Button in a LinearLayout
3) Set it to text, padding, drawableLeft: myPng
seems to be nothing and even looks good , now there is a problem
Google seems to say that these pictures can change color:
That is, I can make it so that after clicking on this button, it turns red like in Instagram. like button (I like it)
PS Perhaps you can even give some advice on how to write this correctly. Or are there repositories open for similar applications
Answer the question
In order to leave comments, you need to log in
Google seems to have quite clearly written how to add pictures to a button: developer.android.com/intl/ru/guide/topics/ui/cont... If we talk about a button that changes its appearance depending on the state, then I It seems that here you need to modify the appearance of the Checkbox. I think this option will help you: stackoverflow.com/questions/3192173/change-icons-o...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question