Android--(6)--详解ImageButton属性
来源:互联网 发布:软件合同登记 编辑:程序博客网 时间:2024/06/05 20:11
ImageButton是android.widget.ImageView的子类
android:src : 这将设置一个可绘制的 ImageView 内容
android:adjustViewBounds :设置为true,如果想调整ImageView其边界,以保持其绘制的高宽比
android:baseline: 这是偏移此视图内部基线
android:baselineAlignBottom: 如果为true,则图像视图会基于其底部边缘基线对齐
android:cropToPadding : 如果为true,图像将被裁剪以适合其填充之内
android:background :这是一个可拉伸使用来做背景
android:contentDescription :定义文本简要描述视图内容
android:onClick: 在本视图的上下文视图被点击时调用的方法的名称
android:visibility: 控制视图的初始可视性
效果图:
代码段:
<ImageView android:id="@+id/img1" android:src="@drawable/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_span="2" android:adjustViewBounds="true" android:scaleType="centerCrop" android:layout_marginBottom="30dp" />
学习之用,笔记作用!!!
阅读全文
0 0
- Android--(6)--详解ImageButton属性
- Android相对布局(RelativeLayout)imageButton属性详解
- ImageButton属性
- Android的ImageButton、visibility、ellipsize、scaleType属性
- Android中ImageButton的运用详解
- Android中ImageButton的运用详解
- Android ImageView,ImageButton的scaleType属性与adjustViewBounds属性
- Android ImageView,ImageButton的scaleType属性与adjustViewBounds属性
- 【Android】android:padding属性设置对ImageButton无效问题
- android ImageButton
- android:scaleType属性 图片在imagebutton中自适应
- Android第三课;Button与ImageButton的基本属性
- ImageButton有无Enable属性
- Android中ImageView和ImageButton的比较详解
- Android的ImageButton问题
- Android基础(一) ImageButton
- Android-ImageButton的使用
- Android-ImageButton的使用
- 数据库连接Java
- matlab2c使用c++实现matlab函数系列教程-normpdf函数
- 【BZOJ1426】收集邮票 期望DP
- js正则中\b的用法
- 本无完美
- Android--(6)--详解ImageButton属性
- 2017-09-10 LeetCode_017 Letter Combinations of a Phone Number
- 算法分析与设计丨第一周丨LeetCode(2)——Different Ways to Add Parentheses(Medium)
- anaconda 中查看库的版本号
- matlab2c使用c++实现matlab函数系列教程-exprnd函数
- 零基础学小程序007----小程序轮播图,自动轮播,循环轮播,定时轮播
- PRML Notes-Chapter1 Introduction(1.2 Probability Theory)
- MySQL数据库引擎
- Pylon5 SDK搭配OpenCV使用入门(Visual studio 2015)