Android一个类似腾讯 QQ 背景图片可以上下左右移动的 imageview
来源:互联网 发布:网络教育培训机构 编辑:程序博客网 时间:2024/05/10 17:09
CoolImageView
项目地址:HuTianQi/CoolImageView
简介:一个类似腾讯 QQ 背景图片可以上下移动的 imageview,功能比腾讯 QQ 更加强大,还支持左右移动,支持在 xml 文件中设置移动方向(注意:是背景图片的移动,不是用动画让控件移动,那太简单了)
A imageView is similar to QQ that imageView background picture can move up and down,But the function is more powerful than QQ,it also supports left and right movement
Dynamic effect preview (Because the gif resources are large, please wait for the resources to complete the load)
this is background picture left and right movement
this is background picture move up and down
How to use
step1: Add the following to your attrs.xml file (in res/values):
<resources> <declare-styleable name="CoolImageView"> <attr name="direction" format="string"/> </declare-styleable></resources>
step2:Add the following code to the root view of your layout:
xmlns:app="http://schemas.android.com/apk/res-auto"
step3:Add the widget code in the appropriate place in your xml file, Here's a sample implementation:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.example.hzhuqi.coolimagview.MainActivity"> <com.example.hzhuqi.coolimagview.CoolImageView android:layout_width="wrap_content" android:layout_height="300dp" android:src="@mipmap/qq" app:direction="horizontal" > </com.example.hzhuqi.coolimagview.CoolImageView> <com.example.hzhuqi.coolimagview.CoolImageView android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@mipmap/qq_" app:direction="vertical" > </com.example.hzhuqi.coolimagview.CoolImageView></LinearLayout>
Notice:
you should set direction properties in your xml file,If you don't want to do that.You can use ordinary ImageView instead
阅读全文
0 0
- Android一个类似腾讯 QQ 背景图片可以上下左右移动的 imageview
- 用OpenGL写的一个可以上下左右移动的球
- 放大可以移动的ImageView
- 类似QQ的好友移动功能
- android 上下左右都能滑动的是类似scorllview效果
- 鼠标移动到一个位置,显示图片(类似qq的隐藏显示功能)
- 【Android】可移动的ImageView
- 移动的上下左右滑动
- JavaScript实现的类似腾讯QQ聊天窗口抖动效果
- 一个类似QQ登陆框的EDIT
- 一个类似QQ的java聊天程序
- 实现一个类似QQ的社交聊天工具
- 一个可以一直滚动的ImageView
- Android TV 焦点上下左右移动
- android中自己写一个Fragment的应用,类似QQ的一个框架
- 像腾讯QQ和Skype一样定义自己的类似HTTP的Web协议,可以通过URL来触发自己的程序(附源码)
- android 解决按钮、imageView 背景图片拉伸变大的问题
- Android 控件的显示隐藏上下左右移动动画
- H5移动端常见问题
- 多个基于AIDL的server,Binder驱动怎么区分它们
- Xamain.Forms 用户界面——控件——Map
- TDD (test driver development)测试驱动开发
- bzoj 1497: [NOI2006]最大获利 最小割 最大权闭和子图
- Android一个类似腾讯 QQ 背景图片可以上下左右移动的 imageview
- Apache Kylin权威指南 1.5版本 笔记
- Mysql索引类型
- ubuntu 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)”的方法
- weblogic部署war
- HDU
- Caused by: java.lang.ClassNotFoundException: org.hamcrest.SelfDescribing
- 小白入门---HTML5中数据的存储方式
- Linux 文件系统编程之系统调用和标准I/O库