An image button is a button that displays an image, regardless of platform
23
votes
4answers
33k views
Android ImageButton with a selected state?
If I was using an ImageButton with a selector for its background, is there a state I can change which will make it change its appearance? Right now I can get it to change images when pressed, but ...
121
votes
7answers
76k views
How to have a transparent ImageButton: Android
<ImageButton android:id="@+id/previous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/media_skip_backward"
...
27
votes
5answers
27k views
How to show the text on a ImageButton?
I have a ImageButton and I want show a text and a image on it. But when I try
<ImageButton
android:text="OK"
android:id="@+id/buttonok"
android:src="@drawable/buttonok"
...
18
votes
6answers
8k views
How do I keep the aspect ratio on image buttons in android?
I have 5 square ImageButtons that I want to have lined up side by side on the bottom of the screen. I have each one set (different id's) as:
<ImageButton
android:id="@+id/box1"
...
7
votes
3answers
18k views
Android: How to prevent image from being scaled in ImageView or ImageButton?
How can I prevent my bitmap from being scaled automatically in an ImageView or ImageButton if the view or button is stretched using "fill_parent" or using "weight"?
This will be useful, for example, ...
13
votes
8answers
53k views
ImageButton in Android
Can anybody tell me how to resize the imageButton to fit the image exactly..This is the code that i tried, but the image is placed at the position that i am locating using
android:scaleType but i ...
14
votes
1answer
17k views
Android Set ImageButton as Toggle
How can I have an imagebutton stay in the 'pressed' state when it is clicked? Basically I just want the background to be the depressed background, but I can't figure out how to set it. At the moment, ...
1
vote
2answers
2k views
Android: vertical 3d listview
I would like to make vertical 3d list view like here, but for ImageButtons and for free. Is there any library or sample code for that? I am new in Android development, so I don't know how to animate ...
6
votes
2answers
874 views
Creating irregular shaped ImageButton with different click states
I created an ImageButton with a selector for pressed and non-pressed states, and this works fine.
But the button has an irregular shape and I only want it clickable where the underlying rectangular ...
2
votes
2answers
7k views
Setting imageURL using a function in ASP.NET
I've done this task before within repeaters and it has worked. However I can't get the below to work for me in a normal webforms page. The images appear as broken links and breakpoints I put in the ...
23
votes
1answer
5k views
Difference between a clickable ImageView and ImageButton
I'm just wondering if there is any significant difference between an ImageView that's set to be clickable, compared with an ImageButton?
Is there any reason for using one over the other? Is there any ...
12
votes
2answers
10k views
How do I change the tint of an ImageButton on focus/press
I have an ImageButton in my app and I need to change the tint of the image when the button is pressed/focused. I have the ImageButton set to get its src from an XML file which as follows:
<?xml ...
8
votes
7answers
9k views
How to disable submit behaviour of asp:ImageButton?
I have a image button in a page which can be triggered on mouse click, by default it gets triggered on enter press also which i want to disable.
I know about "UseSubmitBehaviour" attribute in ...
13
votes
6answers
7k views
How to remove ImageButton's standard background image?
In ImageButton I want to remove the standard button background image. In http://developer.android.com it is said, that one must define his\her own background image or set the background color to be ...
6
votes
2answers
2k views
ImageButton does not display an particular drawable
This is rather a funny problem I have ever come across:
I have a table layout with 9 image buttons, 3 per row. Every ImageButton has a different image associated with it. I have set the background of ...