ZoomButton与ZoomControls学习笔记
来源:互联网 发布:ug 编程实例 编辑:程序博客网 时间:2024/05/14 13:03
<>Button与ImageButton的区别在于,Button生成的按钮上显示文字,而ImageButton上显示图片。
<>ImageButton指定的android:text属性没有。
<>ImageButton派生了一个ZoomButton,可以代表“放大”、“缩小”两个按钮,只要为zoomButton的android:src
<>属性分别指定btn_minux、btn_plus,即可实现“放大”、“缩小”按钮。
<>ImageButton指定的android:text属性没有。
<>ImageButton派生了一个ZoomButton,可以代表“放大”、“缩小”两个按钮,只要为zoomButton的android:src
<>属性分别指定btn_minux、btn_plus,即可实现“放大”、“缩小”按钮。
<>android还提供了一个ZoomControls组件,该组件相当于组合了“放大”、“缩小”两个按钮,并允许分别为两个按钮绑定不同的事件监听器。
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"><!-- 普通图片按钮 --><ImageButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/blue"/><!-- 按下时显示不同图片的按钮 --><ImageButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/button_selector"/><LinearLayoutandroid:orientation="horizontal"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_margin="10sp"android:layout_gravity="center_horizontal"><!-- 分别定义2个ZoomButton,并分别似乎用btn_minus和btn_plus图片 --><ZoomButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:id="@+id/btn_zoom_down"android:src="@android:drawable/btn_minus" /><ZoomButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:id="@+id/btn_zoom_up"android:src="@android:drawable/btn_plus" /></LinearLayout><!-- 定义ZoomControls组件 --><ZoomControls android:id="@+id/zoomControls1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal"/></LinearLayout>运行结果:
0 0
- ZoomButton与ZoomControls学习笔记
- Android ZoomButton ZoomControls
- 笔记38--ZoomButton和ZoomControl
- 地图的放大与缩小2:利用缩放控件ZoomControls
- android中的ZoomButton源码
- ZoomButton的使用
- Android7.0 中文API -- ZoomButton
- webview的缩放+zoomcontrols
- ZoomControls放大缩小图片
- 缩放控件ZoomControls使用
- ZoomControls的延时消失
- ZoomControls,PopupWindow,ExpandableListView
- ZoomControls 缩放控制
- 缩放控制ZoomControls
- Android ZoomControls的使用
- 学习笔记与总结
- Android ZoomControls放大缩小图片
- Android ZoomControls放大缩小图片
- shell学习完结篇----希望你能看到
- Ancient Cipher
- GCD介绍(一):基本概念和Dispatch Queue
- tcl脚本真的比shell脚本解析处理文件效率要高?
- UI04_UIButton
- ZoomButton与ZoomControls学习笔记
- HDU 3498 whosyourdaddy
- Largest Number
- 连载二 那些在无线互联的日子
- 【事件驱动】【蓝牙控制车锁或电灯】初步方案
- hdu4800_Josephina and RPG(二维状态dp)
- Hangman Judge
- MySQL的查询缓存
- centos下的svn安装(服务端)