//水波纹效果
//v 指定控件 x屏幕的 x轴 y轴 endRadio 起始位置 水波半径
Animator circularReveal = ViewAnimationUtils.createCircularReveal(v, x, y, endRadius,Math.max(width, height));
circularReveal.setDuration(2000); //动画时长
circularReveal.start();//开启动画
//实例化 5.0toolbar 在xml中声明
mToolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
//获取ActionBar
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
//ActionBar 与DrawerLayout有一个连接的工具类,可以做出一个炫酷的效果
ActionBarDrawerToggle drawerToggle = new ActionBarDrawerToggle(this, mDraw, mToolbar, R.string.opend_drawer, R.string.close_drawer);
//同步状态 (效果比较帅)
drawerToggle.syncState();
//与DrawLayout联动监听
mDraw.addDrawerListener(drawerToggle); //pupupWindow (类似与Dialog,可以自定义样式做出更帅气的样式)
pop = LayoutInflater.from(this).inflate(R.layout.popul, null);  //导入popupWindow布局
DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); //得到屏幕的宽高
int widthPixels = displayMetrics.widthPixels;
int heightPixels = displayMetrics.heightPixels; mPopupWindow.setWidth(widthPixels * 2 / 3);
mPopupWindow.setHeight(heightPixels / 3);
mPopupWindow.setAnimationStyle(R.style.pop_animation); //导入动画 style 这里添加了进入和退出的动画
//点击popupWindow以外的地方 popupWindow会消失
mPopupWindow.setFocusable(true);
mPopupWindow.setOutsideTouchable(true);
mPopupWindow.setBackgroundDrawable(new BitmapDrawable()); //
得到控件的高度
int height = mOpen.getMeasuredHeight();//

//共享元素 需要在新页面和当前页面View设置一样的 transitionName值; 在页面跳转的时候我们会感觉前一页的控件是移动到新的页面的
ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation(this, v, string);  //指定共享动画的控件
Pair sharedElements = new Pair(v, string); //是可变参数
Pair pair = new Pair(mBtn, string1);//string1 transitionName的属性
ActivityOptionsCompat.makeSceneTransitionAnimation(this, sharedElements, pair);
//
startActivity(intent, optionsCompat.toBundle()); //动画只在5.0之上之上
DrawLayout android5.0推出的侧滑菜单
DrawerLayout包含两个或3个直接的Chiled默认是在中间 如果想让child显示在左边,作为左侧菜单用layout_gravity=left 或start
反之右边

Android 5.0属性的更多相关文章

  1. Android 5.0 如何正确启用isLoggable(一)__使用详解

    转自:http://blog.csdn.net/yihongyuelan/article/details/46409389 isLoggable是什么 在Android源码中,我们经常可以看到如下代码 ...

  2. Android控件属性大全(转)

    http://blog.csdn.net/pku_android/article/details/7365685 LinearLayout         线性布局        子元素任意: Tab ...

  3. Android开发EditText属性

    Android开发EditText属性 EditText继承关系:View-->TextView-->EditText EditText的属性很多,这里介绍几个:android:hint= ...

  4. Android之shape属性详解

    有时候 ,为了满足一些需求,我们要用到 shape 去定义 一些背景,shape 的用法 跟图片一样 ,可以给View设置 Android:background="@drawable/sha ...

  5. Android 4.0 事件输入(Event Input)系统

    参考:http://blog.csdn.net/myarrow/article/details/7091061 1. TouchScreen功能在Android4.0下不工作 原来在Android2. ...

  6. [转]Android 5.0——Material Design详解(动画篇)

    Material Design:Google推出的一个全新的设计语言,它的特点就是拟物扁平化. Material Design包含了很多内容,今天跟大家分享一下Material新增的动画: 在Andr ...

  7. Android(java)学习笔记263:Android下的属性动画(Property Animation)

    1. 属性动画(Property Animation)引入: 在手机上去实现一些动画效果算是件比较炫酷的事情,因此Android系统在一开始的时候就给我们提供了两种实现动画效果的方式,逐帧动画(fra ...

  8. Android Animation 动画属性

    在 Android 中, Animation 动画效果的实现可以通过两种方式进行实现: 一种是 tweened animation 渐变动画,另一种是 frame by frame animation ...

  9. Android中shape属性详解

    一.简单使用 刚开始,就先不讲一堆标签的意义及用法,先简单看看shape标签怎么用. 1.新建shape文件 首先在res/drawable文件夹下,新建一个文件,命名为:shape_radius.x ...

随机推荐

  1. it市场

    SAP收购Sybase意欲何为 http://tech.diannaodian.com/dw/data/sybase/2012/0925/199681.html 德国行业管理软件解决方案提供商SAP宣 ...

  2. Imagenet tools install on windows

    1.find the pyrcc4.exe path: C:\Anaconda2\Library\bin 2.cmd: pyrcc4 -o resources.py resources.qrc 3.a ...

  3. Visual studio智能感知挡住了当前代码输入行

    AssistX->Listboxes->Enable Visual Assist completion, suggestion and member list in .. 如果勾选了该项就 ...

  4. webpack-vue搭建,部署到后端

    1.安装npm(安装node自带npm),npm安装成功测试 2.安装cnpm,也可以装nvm-windows 步骤1,打开user/admin/.npmrc,输入,也可以用命令 步骤2,输入npm ...

  5. AES--高级数据加密标准

    AES--高级数据加密标准 对称密码体制的发展趋势将以分组密码为重点.分组密码算法通常由密钥扩展算法和加密(解密)算法两部分组成.密钥扩展算法将b字节用户主密钥扩展成r个子密钥.加密算法由一个密码学上 ...

  6. 解决类似 Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)的问题

    源码编译升级安装了gcc后,编译程序或运行其它程序时,有时会出现类似/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found的问题.这 ...

  7. Linux查找含有某字符串的所有文件

    转自:http://151wqooo.blog.51cto.com/2610898/1162118 如果你想在当前目录下 查找"hello,world!"字符串,可以这样: gre ...

  8. EF执行SQL

    1.EntityFramework 执行SQL语句进行参数化查询代码示例 参考:http://blog.csdn.net/chz_cslg/article/details/49002093

  9. Server Name Indication(SNI)

    转载自: http://openwares.net/misc/server_name_indication.html Server Name Indication是用来改善SSL(Secure Soc ...

  10. <工作一周的心情总结>

    到公司一个星期有余,明天就要周六了,蛮开心的,兴奋的今天下午没看一点代码,哈哈~ 我做的算是代码界里最简单,最好玩,最有成就感的html,web网页的编程. 截止到目前,除了看不懂的JavaScrip ...