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移动应用,编 ...
随机推荐
- 【 .NET 面向对象程序设计进阶》】【 《.NET 面向对象编程基础》】【《正则表达式助手》】
<.NET 面向对象程序设计进阶> <.NET 面向对象程序设计进阶> <正则表达式助手>
- Beautiful Soup 中文文档
Beautiful Soup 3.0 中文文档说明: http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html Be ...
- python 在 eclipse 上的编码配置问题
Eclipse的设置 window->preferences->general->editors->text editors->spelling->encoding ...
- C#判断文件是否正在被使用
生成文件的时候,如果该文件夹下的同名文件被打开(或者被使用),如果这时再生成一个同名文件,则会提示文件正在被占用. 解决方法有两个,一个是保存的文件名改成该文件夹下不存在的(随机数之类的XXOO都行, ...
- spring boot web相关配置
spring boot集成了servlet容器,当我们在pom文件中增加spring-boot-starter-web的maven依赖时,不做任何web相关的配置便能提供web服务,这还得归于spri ...
- 键盘皇者 RealForce 104Pro独家评测
http://tech.sina.cn/?sa=t84d20738943v44&page=2&pwt=rest2&vt=4&from=mbaidu&clickt ...
- [Android Studio 权威教程]Windows下安装Android Studio
从AS 0.5版本号開始使用.也是AS的推行者,在ApkBus公布的第一篇Android Studio Perview 2 获得了50K的浏览,1800多条回复下载. 在我的[Android Stud ...
- Mac OS设置rootpassword
不知怎么忘记mac os系统的rootpassword了 方法一: 首先,启动机器,启动时按住Apple和S键,以单用户模式(single user mode)进入系统.输入:mount -uw / ...
- hdu 4507 数位dp(求和,求平方和)
http://acm.hdu.edu.cn/showproblem.php?pid=4507 Problem Description 单身! 依旧单身! 吉哥依旧单身! DS级码农吉哥依旧单身! 所以 ...
- Swift Swift语言Storyboard教程:第二部
本文由CocoaChina翻译小组@TurtleFromMars翻译自raywenderlich,原文:Storyboards Tutorial in Swift: Part 2 更新记录:该Stor ...