Android复制WIN8点击下沉倾斜系统瓷砖效果
※效果
※使用说明
Java代码
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast; public class TestRolateAnimActivity extends Activity {
/** Called when the activity is first created. */
MyImageView joke;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main); joke=(MyImageView) findViewById(R.id.c_joke);
joke.setOnClickIntent(new MyImageView.OnViewClick() { @Override
public void onClick() {
// TODO Auto-generated method stub
Toast.makeText(TestRolateAnimActivity.this, "事件触发", 1000).show();
System.out.println("1");
}
});
}
}
XML代码
<? xml version="1.0" encoding="utf-8"? >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center"
android:orientation="vertical" android:background="@drawable/bkg_img_default"> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<com.ljp.ani.MyImageView
android:id="@+id/c_joke"
android:layout_width="wrap_content" android:scaleType="matrix"
android:layout_height="wrap_content" android:layout_margin="2dp"
android:src="@drawable/left_top" />
<com.ljp.ani.MyImageView
android:id="@+id/c_idea"
android:layout_width="wrap_content" android:scaleType="matrix"
android:layout_height="wrap_content" android:layout_margin="2dp"
android:src="@drawable/left_bottom" />
</LinearLayout>
<com.ljp.ani.MyImageView
android:id="@+id/c_constellation"
android:layout_width="wrap_content" android:scaleType="matrix"
android:layout_height="wrap_content" android:layout_margin="2dp"
android:src="@drawable/right" />
</LinearLayout>
<com.ljp.ani.MyImageView
android:id="@+id/c_recommend"
android:layout_width="wrap_content" android:scaleType="matrix"
android:layout_height="wrap_content" android:layout_margin="2dp"
android:src="@drawable/bottom" />
</LinearLayout> </LinearLayout>
Demo下载
Android复制WIN8点击下沉倾斜系统瓷砖效果的更多相关文章
- Android仿WIN8系统磁贴点击下沉倾斜效果
※效果 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGluZ2xvbmd4aW4yNA==/font/5a6L5L2T/fontsize/400/fil ...
- android制,点击EditText时刻,隐藏系统软键盘,显示光标
由于项目中要用自己定义的随机键盘,所以必须得屏蔽系统软键盘,可是在4.0的測试系统来看,使用editText.setInputType(InputType.TYPE_NULL)方法固然能隐藏键盘,可是 ...
- 【转】Android 将自己的应用改为系统应用
所谓系统程序就是system/app目录中的程序,普通应用转换成系统程序后有稳定.减少内存(DATA)空间占用.恢复出厂设置后不会消失.修改系统时间.调用隐藏方法.系统关机重启.静默安装升级卸载应用等 ...
- Android编程实现点击链接打开APP功能示例
本文实例讲述了Android编程实现点击链接打开APP功能.分享给大家供大家参考,具体如下: 在Android中点击链接打开APP是一个很常见的需求.例如,电商为用户发送优惠券之后经常会下发一条短信: ...
- android中ListView点击和里边按钮点击不能同时生效问题解决
今天遇到一个问题:android中ListView点击和里边button点击不能同时生效问题解决. 原因是: listView 在开始绘制的时候,系统首先调用getCount()函数,根据他的返回值得 ...
- Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面
现在开发中的功能需要直接跳转到拨号.联系人.短信界面等等,查找了很多资料,自己整理了一下. 1.跳转到拨号界面,代码如下: 1)直接拨打 Intent intentPhone = new Intent ...
- 基于Android的模拟点击探索
前言 压力测试中,一般会用到自动化测试.准备写一个APP,可以记录屏幕上的点击事件,然后通过shell命令来模拟自动执行.shell指令,比较容易实现.那么,关键的一步是获取点击的坐标.对于Andro ...
- android: Android水波纹点击效果
Android API 21及以上新增了ripple标签用来实现水波纹的效果.我们可以通过设置ripple背景来实现一些View点击效果. 该水波纹效果有两种:一种是有界的(点击后类似于一个矩形向四周 ...
- Android中Listview点击item不变颜色以及设置listselector 无效
Android中Listview点击item不变颜色以及设置listselector 无效 这是同一个问题,Listview中点击item是会变颜色的,因为listview设置了默认的listsele ...
随机推荐
- WCF-001:WCF的发布
随着“云”时代的到来,“云”已经无处不在了.什么是“云”,无非就是利用互联网强大的功能建立多个服务器,然后再利用互联网的传输数据的特点将数据从某个服务器中读取出来或者将你的数据上传上去.当然这个服务器 ...
- [转载] 创建为ClickOnce清单签名的.pfx格式数字证书
使用vs2013自动创建的.pfx数字证书默认有效期只有一年,并且“颁发者”.“颁发给”均为当前机器名和当前登陆用户名的组合,其实我们完全可以创建更友好的.pfx数字证书. 打开Microsoft . ...
- 连接字符串中Min Pool Size的理解是错误,超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。
Min Pool Size的理解是错误的 假设我们在一个ASP.NET应用程序的连接字符串中将Min Pool Size设置为30: <add name="cnblogs" ...
- 迅雷云加速开放平台c#demo
迅雷云加速开放平台c#demo.很多人很遇到下载文件的问题.这个例子是调用迅雷云加速开放平台的dll,进行下载,速度很快,下载过程中可以获取到很全的下载信息,比如下载速度,进度,完成状态等. 例子中带 ...
- 【.NET进程通信】初探.NET中进程间通信的简单的实现
转载请注明出处:http://blog.csdn.net/xiaoy_h/article/details/26090277 废话不多说,IPC就是进程间通信. 进程间通信能够採用的方法非常多,比方创建 ...
- 安卓培训第五天---上传文件SD卡
有关如何将文件上传到先说说SD卡: package com.example.lesson05_02; import java.io.File; import java.io.FileNotFoundE ...
- 【Git使用具体解释】EGit使用具体解释
此系列文章写给那些打算使用Git或正在使用Git,但对Git还不是非常理解的程序员们,希望能帮助大家在学习和使用Git的过程中少走弯路,并以最少的时间和代价来熟悉Git,让Git可以辅助很多其它的开发 ...
- POJ 3691 DNA repair 基于AC自己主动机DP
dp[i][j] 它表示的长度 i 下游前缀 j 更改节点的最小数量. 很清楚dp[0][0] = 0; dp[ i ][ j ] = min(dp[ i ][ j ],dp[i-1][k] + (j ...
- W5500EVB TCP Client模式设置说明
W5500EVB是WIZnet为了方便用户更好了解.使用W5500这款网络芯片所开发的评估板,该板採用了 STM32F103RCT6+W5500 的设计.基于 ARM 的 Cortex-M3 平台.那 ...
- Mybatis之ResultMap一个简短的引论,关联对象
基础部分能够查看我的还有一篇博客http://blog.csdn.net/elim168/article/details/40622491 MyBatis中在查询进行select映射的时候.返回类型能 ...