导读:android ImageButton默认在图片周围添加了白色的边框,很不好看,去掉它的方法:设置如下属性:android:background=#00ffffff 效果前后对比: //android:adjustViewBounds=true //android:padding=0di......
android ImageButton默认在图片周围添加了白色的边框,很不好看,去掉它的方法:
设置如下属性:
android:background="#00ffffff"
效果前后对比:
//android:adjustViewBounds="true"
//android:padding="0dip
即可
其他:
bitmap=((BitmapDrawable)(imgbt.getDrawable())).getBitmap();//得到ImageButton的图片
if(bitmap.getPixel((int)(event.getX()),((int)event.getY()))==0){//判断点击处像素的颜色是否为0,0表示没