美文网首页
android 基础

android 基础

作者: hello_math | 来源:发表于2016-10-17 17:23 被阅读6次

    传说中的Activity周期:

    Activity生命周期

    activity android:launchMode:

    LaunchMode

    standard: 

    singleTop:

    singleTask:

    singleInstance:


    View绘制流程:

    Touch事件机制:

    android:动画Animation,放大缩小,位置移动,加帧==

    A Handler allows you to send and processMessageand Runnable objects associated with a thread'sMessageQueue. Each Handler instance is associated with a single thread and that thread's message queue. When you create a new Handler, it is bound to the thread / message queue of the thread that is creating it -- from that point on, it will deliver messages and runnables to that message queue and execute them as they come out of the message queue.

    Looper.prepare();

    //循环代码

    Looper.loop();

    Looper循环,自定义Handler用的

    Handler+AsyncTask区别:AsyncTaskandHandlerare written in Java (internally they use aThread), so everything you can do withHandlerorAsyncTask, you can achieve using aThreadtoo.

    If you are doing something isolated related to UI, for example downloading data to present in a list, go ahead and useAsyncTask.

    If you are doing multiple repeated tasks, for example downloading multiple images which are to be displayed inImageViews(like downloading thumbnails) upon download, use a task queue withHandler.

    加一点比较low的

    在extend下,abstract是必须要继承的,protect和public可以用@override覆写,private完全由本class私有,protect本包私有,public没有私有。两个protect继承会先执行父类方法再执行本类方法

    相关文章

      网友评论

          本文标题:android 基础

          本文链接:https://www.haomeiwen.com/subject/nvxzyttx.html