public class

 
HandlerThread
extends Thread
 
Class  Overview
Handy class for starting a new thread that has a looper.The looper can than be used to create handler classes.Note that start() mast still not called.
 
Handy class for starting a new thread that has a looper.
//这是一个可以很便捷地获取一个Looper来开启一个新线程的类。(这是一个方便创建新线程并拥有looper的类)
The looper can than be used to create handler classes.
//可以利用这个looper创建一盒Handler类。(也就是带looper的handler)
Note that start() mast still not called.
//注意此时start()方法还没调用。
 
Public Constructor//公共构造器
public HandlerThread(String name)
public HandlerThread(String name,int priority)
parameters //参数
priority The priority to run the thread at.The values supplied must be from Procces and not from java.lang.Thread.
//优先级 这个优先级是运行在线程里的,它的值必须是是进程中支持的而非线程。
 
Public Method
public Looper getLooper()
The method returns the looper associated whit this thread.If this thread not been started or for any reason is Alive() returns false,this method will return null.If this thread has been started,this method will brock until the looper has been initialized.
 
The method returns the looper associated whit this thread.
//这个方法将会返回一个和线程关联的looper。
If this thread not been started or for any reason is isAlive() returns false,this method will return null.
//如果这个线程没被执行或者由于任何原因 isAlive()返回假的时候,这个方法将会返回空。
If this thread has been started,this method will brock until the looper has been initialized.
//如果这个线程已经开始运行了,这个方法将会阻塞除非looper已经被初始化。
 
public int getThreadId()
Retunrs the ind identifier of this thread.See Procces.myPid.
//返回这个线程的标识符,见Procces.myPid。
 
public boolean quit()
Ask the currenty running looper to quit.If this thread has not been started or has finished(that is if getLooper() returns null),then false is returned.Otherwise  the looper is asked quit and true is return.
//呼叫当前正在运行中的looper消息循环退出。如果这个线程没有开始或者线程已经执行完毕(getLooper 将返回空),就返回假。否则将退出消息循环并返回真。
 
public void run()
Calls the run() method of the Runnable object the receiver holds.If no Runnable set,does nothing.
//Runnable 对象调用这个方法...不懂,如果没有对象设置,就不做任何事。

Android英文文档翻译系列(2)——HandlerThread的更多相关文章

  1. Android英文文档翻译系列(1)——AlarmManager

      原文:个人翻译,水平有限,欢迎看官指正.                                                              public class Ala ...

  2. Android英文文档翻译系列(6)——LocalBroadcastManager

    public class LocalBroadcastManager extends Object java.lang.Object    ↳ android.support.v4.content.L ...

  3. Android英文文档翻译系列(5)——VPNService

      API14位于android.net.VpnService 类概述|Class OverviewVpnService is a base class for applications to ext ...

  4. Android英文文档翻译系列(4)——PopupWindow

    public class PopupWindow extends Object //直接继承至Object java.lang.Object ↳ android.widget.PopupWindow  ...

  5. Android英文文档翻译系列(3)——AsyncTask

      AsyncTask——异步任务   个人认为这是翻译比较好的一次.. Class Overview//类概述 AsyncTask enables proper and easy use of th ...

  6. Android开发文档翻译之-Services

    Service是一种能长期在后台运行同一时候不须要与用户进行交互的应用组件.其它组件能够开启service,开启后service能够自行运行及时用户已经切换到其它的应用.此外,组件能够与service ...

  7. Android进阶——多线程系列之Thread、Runnable、Callable、Future、FutureTask

    多线程一直是初学者最抵触的东西,如果你想进阶的话,那必须闯过这道难关,特别是多线程中Thread.Runnable.Callable.Future.FutureTask这几个类往往是初学者容易搞混的. ...

  8. Android提升篇系列:Activity recreate(Activity 重新创建/自我恢复)机制(一)

    注:本文中的recreate是指当内存不足时,Activity被回收,但再次来到此Activity时,系统重新恢复的过程.例如:当Activity A到Activity B时,如果内存不足,A被回收, ...

  9. Android控件系列之RadioButton&RadioGroup(转)

    学习目的: 1.掌握在Android中如何建立RadioGroup和RadioButton 2.掌握RadioGroup的常用属性 3.理解RadioButton和CheckBox的区别 4.掌握Ra ...

随机推荐

  1. Google Guava 库用法整理<转>

    参考: http://codemunchies.com/2009/10/beautiful-code-with-google-collections-guava-and-static-imports- ...

  2. CMake 用法导览

    Preface : 本文是CMake官方文档CMake Tutorial (http://www.cmake.org/cmake/help/cmake_tutorial.html) 的翻译.通过一个样 ...

  3. svg 添加超链接

    <svg>    <a xlink:href="http://www.w3.org//Graphics//SVG//Overview.htm8">      ...

  4. libmysqlclient16 libmysqlclient-dev

    如果提示安装 libmysqlclient16 则用 libmysqlclient-dev 代替之

  5. 终于想明白一些事,关于NAS

    一直以来想搞好一部NAS存储小孩的视频和照片,一直纠结用什么硬件,硬件解决后虽然不甚满意,不过无论怎么样都算投入巨资(超过7千……)组装完毕,然后就一直纠结用什么NAS系统,终于下定决心使用了OMV, ...

  6. gpio irq

    /***************************************************************** * gpio irq * * 一直以来都没了解过gpio的irq, ...

  7. Xenocode Postbuild 2010 for .NET 混淆工具的详细使用步骤【转】

    1,首先我们需要去下载这个工具去,我这里倒是有一个下载的网址,已经被破解了,而且有序列号 http://download.csdn.net/tag/Xenocode+Postbuild+2010+fo ...

  8. (转)x264 编码流程

    转自:http://alphamailpost.blog.163.com/blog/static/20111808120128111160728/ http://www.usr.cc/thread-5 ...

  9. TinyOS节点间通信相关接口和组件介绍

    一.基本通信接口:   Packet:提供了对message_t抽象数据类型的基本访问.这个接口的命令有:清空消息内容,获得消息的有效载荷区长度,获得消息有效载荷区的指针. //tos/interfa ...

  10. MetaSploit Pro 下载地址

    Windows: https://downloads.metasploit.com/data/releases/metasploit-latest-windows-installer.exe Linu ...