<?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的更多相关文章

  1. Android零基础入门第23节:ImageButton和ZoomButton使用大全

    原文:Android零基础入门第23节:ImageButton和ZoomButton使用大全 上一期我们学习了ImageView的使用,那么本期来学习ImageView的两个子控件ImageButto ...

  2. Android开发自学笔记(Android Studio)—4.3ImageView及其子类

    一.引言 ImageView继承自View组件,主要功能用来显示图片,实际上他能显示的不仅是图片,Drawable对象都可以用ImageView来显示. ImageView派生了ImageButton ...

  3. ImageView及其子类

    ImageView及其子类 (1)ImageView继承自View组件,任何Drawable对象都可以用ImageView来显示,ImageView派生出来了ImageButton.ZoomButto ...

  4. ImageView及其子类(一)

    ImageView继承自View组件,它的主要功能是用于显示图片——实际上这个书法不太严谨因为他能显示的不仅是图片,任何Drawable对象都可以使用ImageView来显示.除此之外,ImageVi ...

  5. Android的ImageView介绍-android学习之旅(二十二)

    ImageView简介 imageView继承于View,主要用于显示图片,凡是Drawable对象都可以用它显示. ImageView直接派生了ImageButton和ZoomButton等组件. ...

  6. Android开发的基础知识点

    1.Android开发的四大组件: Activity:android应用程序上看到的一页. Service:运行在后台,可以其他组件交互(音乐播放器). BroadcoastReceiver:用来对外 ...

  7. Android零基础入门第29节:善用TableLayout表格布局,事半功倍

    原文:Android零基础入门第29节:善用TableLayout表格布局,事半功倍 前面学习了线性布局和相对布局,线性布局虽然方便,但如果遇到控件需要排列整齐的情况就很难达到要求,用相对布局又比较麻 ...

  8. Android零基础入门第30节:两分钟掌握FrameLayout帧布局

    原文:Android零基础入门第30节:两分钟掌握FrameLayout帧布局 前面学习了线性布局.相对布局.表格布局,那么本期来学习第四种布局--FrameLayout帧布局. 一.认识FrameL ...

  9. Android零基础入门第28节:轻松掌握RelativeLayout相对布局

    原文:Android零基础入门第28节:轻松掌握RelativeLayout相对布局 在前面三期中我们对LinearLayout进行了详细的解析,LinearLayout也是我们用的比较多的一个布局. ...

随机推荐

  1. VMware Linux系统克隆

    系统克隆 网卡设备无法识别 解决克隆虚拟机后网卡设备无法识别启动问题的方法 一.故障问题 从vmware workstation中克隆(clone)了一个CentOS 6的虚拟机,启动之后发现网卡没有 ...

  2. spark-submit python egg 解决三方件依赖问题

    假设spark里用到了purl这个三方件,https://github.com/ultrabluewolf/p.url,他还额外依赖futures这个三方件(six的话,anaconda2自带). p ...

  3. python的简介(解释器、变量、用户交互、if语句)

    一.python的起源 python是吉多·范罗苏姆(Guido van Rossum)在1989年的圣诞节期间因为无聊打发时间所开发的一个脚本解释程序. python是一门解释型.弱类型的编程语言. ...

  4. js正则验证input输入框有空格时提示直接去除空格

    <input type="text" id="test"/> <input type="button" value=&qu ...

  5. dede5.7评论框不显示,文章页表情不显示,解决办法

    dede5.7评论框不显示,文章页表情不显示,解决办法 进入dede后台,系统-系统基本参数-其它选项,找到模板引擎禁用标签,去掉里面的php,如图 进入dede模板目录,默认是/templets/d ...

  6. asp.net+ueditor word粘贴上传

    最近公司做项目需要实现一个功能,在网页富文本编辑器中实现粘贴Word图文的功能. 我们在网站中使用的Web编辑器比较多,都是根据用户需求来选择的.目前还没有固定哪一个编辑器 有时候用的是UEditor ...

  7. 数码管动态显示——74HC04

    1.电路设计: p0实现段选,p2实现位选,74hc04是反相器,有反向和放大的双重作用. 2.程序设计: #include<reg52.h> code unsigned char sev ...

  8. C用malloc 向系统申请一个大小为n*4个字节的内存块

    #include <stdio.h> #include <malloc.h> void out(int *p, int n){ int i; for(i=0;i<n;i+ ...

  9. TFRecord 使用

    tfrecord生成 import os import xmltodict import tensorflow as tf import numpy as np dir_path = 'F:\数据存储 ...

  10. 32、reduceByKey和groupByKey对比

    一.groupByKey 1.图解 val counts = pairs.groupByKey().map(wordCounts => (wordCounts._1, wordCounts._2 ...