imageButton和zoomButton

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- 普通图片按钮 -->
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/blue"/>
<!-- 按下时显示不同图片的按钮 -->
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/button_selector"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10sp"
android:layout_gravity="center_horizontal">
<!-- 分别定义两个ZoomButton,并分别使用btn_minus和btn_plus图片 -->
<ZoomButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btn_zoom_down"
android:src="@android:drawable/btn_minus" />
<ZoomButton
android: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>
imageButton和zoomButton的更多相关文章
- Android零基础入门第23节:ImageButton和ZoomButton使用大全
原文:Android零基础入门第23节:ImageButton和ZoomButton使用大全 上一期我们学习了ImageView的使用,那么本期来学习ImageView的两个子控件ImageButto ...
- Android开发自学笔记(Android Studio)—4.3ImageView及其子类
一.引言 ImageView继承自View组件,主要功能用来显示图片,实际上他能显示的不仅是图片,Drawable对象都可以用ImageView来显示. ImageView派生了ImageButton ...
- ImageView及其子类
ImageView及其子类 (1)ImageView继承自View组件,任何Drawable对象都可以用ImageView来显示,ImageView派生出来了ImageButton.ZoomButto ...
- ImageView及其子类(一)
ImageView继承自View组件,它的主要功能是用于显示图片——实际上这个书法不太严谨因为他能显示的不仅是图片,任何Drawable对象都可以使用ImageView来显示.除此之外,ImageVi ...
- Android的ImageView介绍-android学习之旅(二十二)
ImageView简介 imageView继承于View,主要用于显示图片,凡是Drawable对象都可以用它显示. ImageView直接派生了ImageButton和ZoomButton等组件. ...
- Android开发的基础知识点
1.Android开发的四大组件: Activity:android应用程序上看到的一页. Service:运行在后台,可以其他组件交互(音乐播放器). BroadcoastReceiver:用来对外 ...
- Android零基础入门第29节:善用TableLayout表格布局,事半功倍
原文:Android零基础入门第29节:善用TableLayout表格布局,事半功倍 前面学习了线性布局和相对布局,线性布局虽然方便,但如果遇到控件需要排列整齐的情况就很难达到要求,用相对布局又比较麻 ...
- Android零基础入门第30节:两分钟掌握FrameLayout帧布局
原文:Android零基础入门第30节:两分钟掌握FrameLayout帧布局 前面学习了线性布局.相对布局.表格布局,那么本期来学习第四种布局--FrameLayout帧布局. 一.认识FrameL ...
- Android零基础入门第28节:轻松掌握RelativeLayout相对布局
原文:Android零基础入门第28节:轻松掌握RelativeLayout相对布局 在前面三期中我们对LinearLayout进行了详细的解析,LinearLayout也是我们用的比较多的一个布局. ...
随机推荐
- c的链表实现
c的链表实现 复习了 单向链表.双向链表 ,代码中注释不多,但基本从函数名字就可以知道函数的作用. 双向链表中的前后节点中的思路是按照linux内核中思路写的. 环境 GCC 7.4.0 单向链表 # ...
- vscode 上安装 leetcode插件
vscode 真是一款非常好的轻量级的代码编辑工具,无论windows还是ubuntu使用体验都非常好. leetcode用来练练脑子吧,不要老年痴呆了. 1. 安装vscode Ubuntu先去下载 ...
- 版本控制Git研究一
对于Git的使用,早在2010年的时候,就已经开始了,接触它也是由于Android开发的原因,我们知道Android源代码的管理就是用的Git,而至今期间已经呆过几个不同的公司,不同公司对于代码的管理 ...
- 微信小程序---存储本地缓存数据
微信小程序之数据缓存 开发中常用setStorageSync来实现本地数据缓存操作 (1)点击缓存案例: <button bindtap="toStorage">存储& ...
- Vue当中的this
10事件绑定 methods当中的this就是Vue实例对象vm var vm = new Vue({ el: '#app', data: { num: 0 }, // 注意点: 这里不要忘记加逗号 ...
- K-means: 多次random initialization来避免bad局部最优
K-means algorithm initialize K-means算法中有一步为随机初始化cluster centroids,这步如何进行,我们将介绍一种运行比较好的方法,这种方法比其它初始化的 ...
- kafka一致性语义保证
一.消息传递语义:三种,至少一次,至多一次,精确一次 1.at lest once:消息不丢,但可能重复 2.at most once:消息会丢,但不会重复 3.Exactly Once:消息不丢,也 ...
- YAML_13 嵌套循环,循环添加多用户
with_nested ansible]# vim add1.yml --- - hosts: web2 remote_user: root vars: un: [a, b, c] ...
- Go Node.js 生成的exe公布成windows服务
环境变量 GOBIN E:\01_SOFT\go1.9.2\bin GOROOT E:\01_SOFT\go1.9.2 GOPATH(下载包的存放位置:go get github.com/gin-go ...
- cube.js 学习(四)cube.js cube 说明
cube 是cube.js data schema 的核心,里面定义了生成sql 的说明 一个比较全的schema 例子 cube(`Users`, { sql: `select * from u ...