- 博客(17)
- 资源 (10)
- 收藏
- 关注
原创 全局Dialog动画--更改系统定义的Dialog动画
全局Dialog动画–更改系统定义的Dialog动画在style.xml文件中,引用了主题,在主题中定义了Dialog的样式与动画,我们只需要在这替换系统定义个Dialog的动画就好。<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.Dar
2016-04-29 19:21:49 1152
原创 PopuWindow的使用
PopuWindow的使用1.在activity_main.xml文件中<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
2016-04-29 17:34:48 944
原创 Activity进入与退出动画之xml实现
Activity进入与退出动画之xml实现Activity进场动画和出场动画,有2中实现方式,一种是通过在style.xml文件中设置进场和出场的动画效果,一种是通过代码的方式在startActivity及finish()后面调用overridePendingTransition(enter,exit)方法;具体实现:在style.xml中定义好一个样式:<style name="zhang" pa
2016-04-28 14:03:55 1828
原创 ValueAnimator.ofObject的使用
ValueAnimator.ofObject的使用1.activity_anim.xml文件<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
2016-04-27 13:39:51 2077
原创 PropertyValuesHolder的使用
PropertyValuesHolder的使用PropertyValuesHolder这个类可以先将动画属性和值暂时的存储起来,后一起执行,在有些时候可以使用替换掉AnimatorSet,减少代码量在activity_main.xml文件中<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://sche
2016-04-26 23:55:34 8291 2
原创 ObjectAnimator的简单使用
ObjectAnimator的简单使用1.在activity_main.xml文件中<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/t
2016-04-26 22:37:53 1239
原创 ValueAnimator的使用
ValueAnimator的使用activity_main.xml文件中<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android
2016-04-26 22:19:55 475
原创 LayoutAnimation动画
LayoutAnimation动画LayoutAnimation作用于ViewGroup,为ViewGroup指定一个动画,这样当它的子元素出场时,都会具有这种效果。实例: 1.在res目录下,新建一个anim目录,在anim目录下,创建一个anim_item.xml文件,文件内容:<set xmlns:android="http://schemas.android.com/apk/res/and
2016-04-24 21:26:33 613
原创 View动画(补间动画)
View动画(补间动画)1.在res目录下创建一个anim目录,在anim目录下创建一个anim.xml文件(文件名任意取)。在anim.xml文件中<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="2
2016-04-24 20:39:01 478
原创 ClipDrawable的使用
ClipDrawable的使用ClipDrawable对应于标签,他可以根据自己当前的等级(level)来裁剪另一个drawable。裁剪的方向可以通过android:clipOrientation和android:gravity属性来共同控制。例子: 1.在clip_drawable.xml文件中<?xml version="1.0" encoding="utf-8"?><clip xmlns
2016-04-24 14:33:41 1452
原创 TransitionDrawable的使用
TransitionDrawable的使用TransitionDrawable对应标签,用于实现两个Drawable之间的淡入淡出效果。<transition xmlns:android="http://schemas.android.com/apk/res/android"> <-- !item的相关属性介绍--> <item android:drawable="@color/co
2016-04-24 13:41:58 1020
原创 如何捕获系统应用程序的界面&&调用系统的下载管理(Downloads)界面
捕获系统应用程序的界面 1.打开你需要捕获的应用程序的界面,通过START字段过滤会有类似下图的log出现,通过log我们可以发现应用程序的包名和界面的具体内容。2.通过包名,查询系统源码,找到对应的清单文件,找到对应的意图过滤器。3.在DownloadManager中对action进行了封装。调用系统的下载管理(Downloads)界面Intent intent = new Intent(Dow
2016-04-24 10:46:32 841
原创 android studio 不能导包问题解决方案
android studio 不能导包问题解决方案前几天遇到android studio不能导包,真是气炸了。实际情况就如图所示,alt+enter快捷键也不提示导包。郁闷吧。 经过研究,简直卧槽啦。1.打开setting 2.弹出窗口,搜索import,按照下图步骤操作即可。 3.按快捷键alt+enter,导包就好了。
2016-04-17 20:24:41 4897
原创 android studio生成签名文件,以及SHA1和MD5值
一、生成签名文件1.点击菜单栏中的Build的。 2.弹出窗体,如下图,选中Generate Signed APK,并点击。 3.弹出窗体,如下图。 4.点击Create new…按钮,创建一个签名文件。选择keystore保存的路径,填写keystore和key密码。ketystore密码和key密码在后面会用到。其他信息不是很重要,按实际情况写就好。 5.点击ok按钮。可以看到,重要的信
2016-04-16 20:21:58 32903
原创 WebView重定向问题的解决方案
我们发现,当WebView在加载网页时,有时会有重定向问题,返回键回退怎么也回退不掉,怎么办?经过我查阅文档,发现WebView有一个方法getHitTestResult();它的返回值是WebView.HitTestResult。HitTestResult是WebView的一个内部类,那么它有什么作用呢?我们在点击网页的链接时,都会有一个TYPE(类型),根据HitTestResult的TYPE(
2016-04-10 11:01:12 9343 3
翻译 WebView.HitTestResult
常量: 方法: WebView有一个getHitTestResult():返回的是一个HitTestResult,一般会根据打开的链接的类型,返回一个extra的信息,如果打开链接不是一个url,或者打开的链接是JavaScript的url,他的类型是UNKNOWN_TYPE,这个url就会通过requestFocusNodeHref(Message)异步重定向。返回的extra为null,或者
2016-04-10 10:35:58 9440
原创 ImageView的src图片交换
activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="mat
2016-04-10 10:16:08 2358
Gradle for Android
2016-11-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人