android最酷的就是它的图片切换效果,而其核心是通过Matrix类来实现的,作了个简单的小例子,可以通过点击两个按钮实现图片的左右转动,奉献以下程序代码;
页面布局matrixlayout.xml代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">

<TextView android:id="@+id/myTextView1" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="hello xiaohua">
</TextView>
<Button android:id="@+id/myButton1" android:text="left"
android:layout_width="wrap_content" android:layout_height="wrap_content">
</Button>
<Button android:id="@+id/myButton2" android:text="right"
android:layout_width="wrap_content" android:layout_height="wrap_content">
</Button>
<ImageView android:id="@+id/myImageView1"
android:layout_width="wrap_content" android:layout_height="wrap_content">
</ImageView>
</LinearLayout>

更多相关文章

  1. android(drawable文件夹)图片适配
  2. 关于android示例程序(bitmapfun)——高效加载图片的坑爹地方
  3. android强大的图片下载和缓存库Picasso
  4. Android如何实现5.0以上图片沉浸式状态栏
  5. 安卓 WebView加载本地图片时居中显示
  6. Android实现图片轮播切换
  7. Android:使用ViewPager实现左右滑动切换图片(图上有点点)
  8. android 自动生成ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi图片

随机推荐

  1. 搭建 npm 私有镜像仓库
  2. 为 Centos7 配置 .htaccess 开启 URL 伪
  3. MongoDB 4.2 内核解析 - Change Stream
  4. CentOS 环境下如何快速安装软件?
  5. 元素的样式来源 基本选择器/上下文选择器
  6. MyCms 自媒体 CMS 系统 v2.4,灵活的辅助属
  7. SSH爆破:是什么?怎么查?怎么预防?
  8. vscode 常用插件
  9. 在Centos 7上配置阿里云Pouch 镜像方法
  10. 一个简易的课程表和注册表单