Android仿WIN8系统磁贴点击下沉倾斜效果
※效果
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGluZ2xvbmd4aW4yNA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
※使用说明
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 metro磁贴布局
代码下载 //更新代码, 这里是更新后的代码 //////////////////////// 1,含一个图片无限滚动的控件,自己实现的 2.可新增删除每个磁贴 3.来个图片吧 ////* ...
- Android 仿Win8的metro的UI界面(上)
转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/23441455 昨晚没事手机下载了一些APP,发现现在仿win8的主界面越来越多, ...
- Android复制WIN8点击下沉倾斜系统瓷砖效果
※效果 ※使用说明 Java代码 import android.app.Activity; import android.os.Bundle; import android.widget.Toast; ...
- Android仿Win8界面的button点击
今天没事的时候,感觉Win8的扁平化的button还是挺好看的,就研究了下怎样在安卓界面实现Win8的扁平化button点击效果. 发现了一个自己定义的View能够实现扁平化button效果,话不多说 ...
- android仿win8
在 eoe上偶然发现已经有人实现了这个功能的源码(地址:http://www.eoeandroid.com /forum.php?mod=viewthread&tid=327557),马上下载 ...
- Android 仿美团网,大众点评购买框悬浮效果之修改版
转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17761431),请尊重他人的辛勤劳动成果,谢谢! 我之前写 ...
- Android的GridView控件点击图片变暗效果
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setC ...
- 仿win8磁贴界面以及功能
做移动产品界面占很大的一部分,同时也是决定一款产品好的的重要因素,最近看见有人放win8的界面效果,搜了两款,一款是只是仿界面没有特效,另一款是自定义组件能够实现反转效果,今天分析一下这两类界面. 仿 ...
- Android仿人人客户端(v5.7.1)——个人主页(三)
转载请标明出处:http://blog.csdn.net/android_ls/article/details/9405089 声明:仿人人项目,所用所有图片资源都来源于其它Android移动应用,编 ...
随机推荐
- ZYNQ-7000 Unable to connect to ps7_cortexa9 解决方案
图1 开发工具:Xilinx SDk 14.4(基于Eclipse,ISE suite 14.4组件之一) 开发板:Xilinx ZYNQ-7000 zc702 rev 1.0(注意:这个板子的版本说 ...
- php 实时汇率接口
function getExchangeRate($from_Currency,$to_Currency) { $amount = urlencode($amount); $from_Currenc ...
- Swift - 使用atlas图集实现动画效果(SpriteKit游戏开发)
我们通常继承SKSpriteNode来实现游戏中的元素,除了可以使用图片作为纹理皮肤外.我们还可以使用动画纹理集来实现动画播放. 动画纹理集的制作也很简单,首先要有一套动画序列图,然后把它们放到一个文 ...
- POJ2782:Bin Packing
Description A set of n<tex2html_verbatim_mark> 1-dimensional items have to be packed in iden ...
- vmware 中 ubuntu linux 安装vmware tools
参考官方方法 http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&ex ...
- TPanel的默认颜色存储在dfm中,读取后在Paint函数中设置刷子的颜色,然后填充整个背景
声明如下: TCustomPanel = class(TCustomControl) private FFullRepaint: Boolean; FParentBackgroundSet: Bool ...
- shell脚本中怎样同时执行多个.sql文件,并把结果写入文件中(转)
转载:http://joewalker.iteye.com/blog/408879命令行下具体用法如下: mysqldump -u用戶名 -p密码 -d 数据库名 表名 > 脚本名;导出整个数据 ...
- 把HTML5网页封装成APP,APK的方法
phonegap appcan HBuilder的native.js 推荐你用两个东西打包 一个是ionic,一个是hbuilder,Maven,apicloud http://mobi ...
- cocos2d-x学习日志(10) --射击游戏(喵星战争)
转载请标明:转载自[小枫栏目],博文链接:http://blog.csdn.net/rexuefengye/article/details/10553487 一.纵版射击游戏的特点 纵版射击游戏是一种 ...
- 浅析innodb_support_xa与innodb_flush_log_at_trx_commit
很久以前对innodb_support_xa存在一点误解,当初一直认为innodb_support_xa只控制外部xa事务,内部的xa事务是mysql内部进行控制,无法人为干预(这里说的内部xa事务主 ...