android
文章平均质量分 64
laurawan
Dream Big Work Hard Repeat...
展开
-
android service基础
一、启动/销毁service//start serviceintent = new Intent(context, MtpService.class);intent.putExtra(UsbManager.USB_FUNCTION_PTP, true);context.startService(intent);//destroy servicecontext.stopSer原创 2013-02-21 11:18:32 · 1227 阅读 · 0 评论 -
AsyncTask
AsyncTask是android平台的,对Java se库中Thread的一个封装。原创 2014-11-05 16:58:45 · 522 阅读 · 0 评论 -
SoftReference & WeakReference
1. SoftReference:软引用-->当虚拟机内存不足时,将会回收它指向的对象;需要获取对象时,可以调用get方法。 2. WeakReference:弱引用-->随时可能会被垃圾回收器回收,不一定要等到虚拟机内存不足时才强制回收。要获取对象时,同样可以调用get方法。 3. WeakReference一般用来防止内存泄漏,要保证内存被虚拟机回收,SoftR转载 2014-11-05 16:10:16 · 623 阅读 · 0 评论 -
Android属性之excludeFromRecents
android:excludeFromRecents控制在不在recent列表中显示。true时不显示;false显示,默认。运行如下activity后,不会显示在recent列表中。 android:name="com.example.com.test.wgh.MainActivity" android:label="@string原创 2014-12-09 09:26:06 · 23179 阅读 · 5 评论 -
Android属性之android:priority
说明:android:priority执行优先级,默认为0,值越大优先级越高。试验:写了三个apk,分别对应priority为2、1、0,如下,只是priority的值不一样。 在恢复出厂设置的执行顺序如下:Activity原创 2014-12-09 14:03:47 · 31238 阅读 · 0 评论 -
#android training# android.database
Schema and contractOne of the main principles of SQL database is schema.You may find it helpful to create a companion class, known as a contract class.A contract class is a container for con原创 2017-03-22 15:07:18 · 368 阅读 · 0 评论 -
#Androdi training# interactions with activities or apps
一 to Other's Appsexplicit intentIntent mIntent = new Intent();mIntent.setClass(this,MainConversationActivity.class);startActivity(mIntent);implicit intentcall:Uri number = Uri.parse原创 2017-03-22 18:11:41 · 326 阅读 · 0 评论 -
#android training# Graphics & Animation:Display Bitmaps Efficiently
#english# give your app an edge on the competitionThese classed will help you create a beautiful visual experience.Display Bitmaps Efficientlykeep UI components responsiveavoid exceeding appli原创 2017-03-23 10:38:30 · 318 阅读 · 0 评论 -
#Android Training# transitions framework
一、AnimationsAnimations是一个实现android UI界面动画效果的API,提供了一系列的动画效果,比如缩放、旋转、淡入淡出等。总的可以分为两类:1.Tweened Animations:提供旋转、移动、伸展、和淡出等效果; Alpha淡入淡出 Scale缩放效果 Rotate旋转 Translate移动效果2.Frame-by-原创 2017-03-22 14:14:05 · 248 阅读 · 0 评论 -
#Android Training# Animations
add subtle visual cuesAnimations are especially useful when the screen changes state, such as when content loads or new actions become avaiable.add a polished lookCrossfade animation(dissolv原创 2017-03-23 17:30:04 · 452 阅读 · 0 评论 -
android属性android:largeHeap
adb shell getpropdalvik.vm.heapsize=128mdalvik原创 2014-10-30 19:01:59 · 12086 阅读 · 0 评论 -
android属性android:stateNotNeeded
默认为false;true时,当activity重新启动时不会调用onSave原创 2014-10-30 20:34:27 · 2440 阅读 · 0 评论 -
android JNI_OnLoad()函数
没有完全原创,参考下面链接的大部分内容:http://blog.csdn.net/zhenyongyuan123/article/details/5862054http://blog.sina.com.cn/s/blog_7a2ffd5c01013vrv.html本文仅作学习使用。 实现JNI中本地函数注册有两种方式:1.采用默认的本地函数注册流程。2.自己重写JNI_原创 2013-02-27 15:07:16 · 5465 阅读 · 0 评论 -
PowerManager WakeLock的操作步骤
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);通过 Context.getSystemService().方法获取PowerManager实例。然后通过PowerManager的newWakeLock((int flags, String tag)来生成WakeLock实例。int转载 2013-11-15 14:07:07 · 1018 阅读 · 0 评论 -
google GMS
不是原创,主要是一些GMS学习笔记。一,GMS简介GMS,Google Mobile Service,谷歌移动服务。GMS目前提供有:Search,Search by Voice,Gmail/Google Mail,Contact Sync,Calendar Sync,Talk,Maps,Street View,YouTube,Android Market服务。谷歌把and原创 2013-11-18 10:38:13 · 4317 阅读 · 0 评论 -
从几种常见的分辨率谈起
分辨率:指显示器所能显示的像素的多少。1024*600(128:75)1280*720(16:9)微软规定的可以支持Windows 8所有功能的最低分辨率是1366X768,再低就没办法使用Win8某些功能了。一、引子:几中常见的分辨率标屏分辨率宽屏分辨率QVGA320×240WQVGA转载 2013-12-07 15:41:08 · 9230 阅读 · 0 评论 -
layout的一些属性
1.android:visibility="gone"其有三个属性:visible显示;invisible显示黑背景条;gone不显示2.android:scaleType属性ImageView.ScaleType.CENTER|android:scaleType="center" 以原图的几何中心点和ImagView的几何中心点为基准,按图片的原来size居中显示,不缩放原创 2013-12-11 18:58:30 · 760 阅读 · 0 评论 -
android布局属性之margin
Margin:android:layout_margin:本元素离上下左右间的距离 android:layout_marginStart:本元素离开始的位置的距离android:layout_marginEnd:本元素离结束位置的距离 android:layout_marginBottomandroid:layout_marginTopandroid:layout_原创 2014-01-13 11:05:54 · 38130 阅读 · 0 评论 -
android layout布局属性
参考:http://blog.csdn.net/msmile_my/article/details/9018775 第一类:属性值 true或者 false android:layout_centerHrizontal 水平居中 android:layout_centerVertical 垂直居中 android:layout_c转载 2014-01-13 11:13:22 · 33228 阅读 · 1 评论 -
android布局属性之weight
先给出一些布局以及其效果,然后分析其原因例一:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="match_parent" android:layout_wi原创 2014-01-13 14:30:40 · 928 阅读 · 0 评论 -
开机动画和音乐
http://blog.sina.com.cn/s/blog_645b74b90101ar9n.html 背景:做了一个需求,就是在手机开机的时候实现一个开机动画的功能,这个应当各个厂商的手机都有,问题是这样的,兄弟组合入这个需求验证的时候发现开机过程中,光有动画没有声音,声音这块是我们负责,我们就要协助处理一下了,好吧,开始分析,中间还小插曲了一下,由于K3手机音频使用的不是audio_原创 2013-05-24 16:56:31 · 904 阅读 · 0 评论 -
RecyclerView实现聊天界面
参考:http://blog.csdn.net/qq_27570955/article/details/52749287原创 2017-03-24 18:45:04 · 657 阅读 · 0 评论