user3332136
user3332136

Reputation: 159

How to set 2 or more images in 1 button

I'm trying to add 1, 2, 3 or 4 images in 1 button. This is what I want to get but I only get 1 image in my button. Does somebody know a solution for this. I us setIcon to add an image in my button.

Upvotes: 0

Views: 48

Answers (2)

user3332136
user3332136

Reputation: 159

I have to make a project for school and it has to look like the game puralax. every white circle is a move. So with this button you can move 2 times. so that's the reason of my question. Also when you move the button, 1 circle has to disappear.

Upvotes: 0

Jack
Jack

Reputation: 172

Why do you need to have this be a button object?

I would make a custom view that emulates the button behavior, but is actually just a View with 2 images behind it. You can set an onclick in XML or in Java for that Activity, different styles for normal and pressed state in XML

Upvotes: 1

Related Questions