ImageButton"边框"的问题
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/white" > <ImageButton android:id="@+id/btnSch" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/next" /> </LinearLayout>
设置上面的代码后,ImageButton四周会有一个边框,感觉没有fill到父容器。
这是因为ImageButton有默认的背景色,如果想让ImageButton彻底fill到父容器,设置android:background="@null"后,即可达到完全填满的效果
PS.图片缩放效果可以通过android:scaleType设置。
转自:http://www.mikebai.com/html/2012-04/941.html
posted on 2013-12-23 11:17 SherryIsMe 阅读(417) 评论(0) 收藏 举报
浙公网安备 33010602011771号