imagebutton

How to have a transparent ImageButton: Android

≡放荡痞女 提交于 2019-11-26 06:51:37
问题 <ImageButton android:id=\"@+id/previous\" android:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\" android:src=\"@drawable/media_skip_backward\" android:background=\"@drawable/transparent\"></ImageButton> This is what I tried to get a transparent ImageButton so as to place those buttons on a SurfaceView. But Eclipse, gives me an error in the project as soon as I include the transparent line in xml. Please help. 回答1: Try using null for the background ... android:background=

can&#39;t click on listview row with imagebutton

家住魔仙堡 提交于 2019-11-26 04:44:24
问题 I have trouble with listview. its items (rows) have imagebutton. imagebutton has \"android:onClick\" so this onclick event is working, but click on row doesnt work. if i remove imagebutton from row item, click on row works (listview has correct onclick listner). How can i fix it ? i need onclick event when user click on imagebutton and standart click event, when user select row (not click the imagebutton but click the row) my listview: <ListView xmlns:android=\"http://schemas.android.com/apk

Android ImageButton with a selected state?

谁说胖子不能爱 提交于 2019-11-26 02:28:50
问题 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 there seems to be no \"highlighted\" or \"selected\" or similar state which lets me toggle its appearance at will. Here\'s my XML; it only changes appearance when pressed. <selector xmlns:android=\"http://schemas.android.com/apk/res/android\"> <item android:state_focused=\"true\" android:state