android中ImageView、ImageButton、Button之间的区别
来源:互联网 发布:java 写入日志 编辑:程序博客网 时间:2024/05/16 12:32
1.继承不同:
java.lang.Object ↳ android.view.View ↳android.widget.ImageView ↳ android.widget.ImageButtonjava.lang.Object ↳ android.view.View ↳ android.widget.TextView ↳android.widget.Button
因而ImageButton 不支持setText,而Button支持。反之,ImageButton 支持setImageURI,而Button不支持。Button和ImageButton有Button的状态,但是ImageView没有。
2.显示差异:
imageView 加上可点击的属性同样实现button的点击功能,这样看来没啥区别,可是可是,最近我做的listView,一个imagebutton,一个imageView 显示圆角图片的时候,imageBotton 居然显示不出来.
ImageButton 拥有默认背景:
<style name="Widget.ImageButton"> <item name="android:focusable">true</item> <item name="android:clickable">true</item> <item name="android:scaleType">center</item> <item name="android:background">@android:drawable/btn_default</item> </style>
3.支持图片:
别人说 :ImageButton支持9.png 吧~imangeView就不行了。
- android中ImageView、ImageButton、Button之间的区别
- android中ImageView、ImageButton、Button之间的区别
- Android中Button,ImageButton,ImageView之间的区别
- android中ImageView、ImageButton、Button之间的区别
- Android中ImageView、ImageButton、Button之间的区别
- android中ImageView、ImageButton、Button之间的区别
- android中ImageView、ImageButton、Button之间的区别
- android:ImageView 和ImageButton的区别
- android Button ImageButton 区别
- android Button ImageButton 区别
- android Button ImageButton 区别
- Android ImageButton和Button的区别
- android ImageButton 和Button的图标区别
- android ImageButton和Button区别
- ImageView和ImageButton的区别
- ImageButton与ImageView的区别
- Android中ImageView和ImageButton
- FAQ_15_android Imageview ImageButton Button
- 如何学习技术
- 迁移 Qt4 至 Qt5 的几个主要环节
- Linux GCC常用命令
- typedef BOOL(WINAPI *MYFUNC) (HWND,COLORREF,BYTE,DWORD);语句的理解
- 正则表达式
- android中ImageView、ImageButton、Button之间的区别
- js判断数字,字母,中文
- Hibernate 基础
- linux用户管理 /拥有着更改/权限改变
- 一个很酷的事件处理简单模型
- 常用正则表达式
- 在eclipse中如何在大量项目中查找指定文件
- boost asio程序优雅的退出 一
- PKU 1195 二维树状数组