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也是我们用的比较多的一个布局. ...
随机推荐
- 一些SQL保存
因为两种Oracle数据库中对于结果行号的处理异同造成的. 在MSSQLServer中,可以使用top和ROW_NUMBER()方法的结合来实现,一般写法比较简单,而Oracle则有很大的不同. 只能 ...
- 怎样制作一个 Python Egg
from:http://liluo.org/blog/2012/08/how-to-create-python-egg/ 制作打包一个 Python Egg 并部署整个过程还蛮有意思的,下面小教程(这 ...
- linux系统编程之信号(七)
今天继续学习信号,主要是学习关于时间和定时器相关的函数的使用,关于这个实际上有很多内容,这里先简要进行说明,等之后再慢慢进行相关深入,也主要是为接下来要做的一个综合linux系统编程的例子做准备,好了 ...
- 【2019牛客多校第一场】XOR
题意: 给你一个集合A,里边有n个正整数,对于所有A的.满足集合内元素异或和为0的子集S,问你∑|S| n<=1e5,元素<=1e18 首先可以转化问题,不求∑|S|,而是求每个元素属于子 ...
- 手写Java的字符串简单匹配方法IndexOf()
简单的字符串模式匹配算法,可使用KMP进行优化 /** * @param s1 母串 * @param s2 子串 * @return */ public static int myIndexOf(S ...
- Run Multiple Webpack Configs Sequentially
https://www.viget.com/articles/run-multiple-webpack-configs-sequentially/ const path = require('path ...
- Python语言程序设计(3)--实例2-python蟒蛇绘制-turtle库
1. 2. 3.了解turtle库 Turtle,也叫海龟渲染器,使用Turtle库画图也叫海龟作图.Turtle库是Python语言中一个很流行的绘制图像的函数库.海龟渲染器,和各种三维软件都有着良 ...
- *JavaScript标准参考教程 - 阮一峰
参考 页向对象编程的模式(继承&模块化)
- csp-s模拟测试93T2口胡(蒟蒻的口胡大家显然就不用看了吧
我们先证正确性,再证复杂度 以下记$\left \langle i,j \right \rangle$为考虑$\left [ i,j \right ]$的点时的最优决策 $\left \langle ...
- 【概率论】6-2:大数定理(The Law of Large Numbers)
title: [概率论]6-2:大数定理(The Law of Large Numbers) categories: - Mathematic - Probability keywords: - Ma ...