自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

转载 Android HandlerThread

博文连接:http://my.eoe.cn/lakeside/archive/15571.html转载于:https://www.cnblogs.com/slowalker/p/3493734.html

2013-12-27 10:51:00 112

转载 JavaScript Window - 浏览器对象模型

1.浏览器对象模型(BOM)使JavaScript有能力与浏览器“对话”。2.所有浏览器都支持window对象。它表示浏览器窗口。3.所有 JavaScript 全局对象、函数以及变量均自动成为 window 对象的成员,全局变量是 window 对象的属性,全局函数是 window 对象的方法。4.HTML DOM 的 document 也是 window 对象的属...

2013-12-06 11:30:00 119

转载 JavaScript数据类型

JavaScript数据类型1.JavaScript中所有的事物都是对象,比如String,Date,Array等;JavaScript允许自定义对象。2.JavaScript 是面向对象的语言,但 JavaScript 不使用类。在 JavaScript 中,不会创建类,也不会通过类来创建对象。 1 <!DOCTYPE html> 2 <htm...

2013-12-06 10:30:00 92

转载 JavaScript基础学习

JavaScript基础学习1. JavaScript可以直接写入HTML输出流 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&g...

2013-12-05 11:24:00 109

转载 Android中WebView使用总结

1.在应用的配置文件中添加网络权限1 <!-- 添加使用WebView的需要的internet权限 -->2 <uses-permission android:name="android.permission.INTERNET"/>2.支持JavaScript1 //开启Javascript支持...

2013-11-24 15:24:00 96

转载 Install and Launch App

I find it quite easy to install and launch an App in android, which I thought it hard.You can install or launch a App as easy as start a Activity with some special Intent.The following little...

2013-11-06 15:27:00 224

转载 Android:VideoView

VideoView Overview  A VideoView is mainly used to display a video file. it can load images from various sources (such as resources or centent providers), takes care of computing its measurement...

2013-11-04 21:42:00 103

转载 Android:ViewSwitcher

ViewSwitcher1. ViewSwitcher is a subclass of ViewAnimator which is a subclass of Fragment.2. A ViewSwitcher is a ViewAnimator that switches between two views, and has a factory(ViewFactory) f...

2013-11-01 18:54:00 141

转载 Android:ImageSwitcher

ImageSwitcher is a subclass of ViewSwitcher. You can implement a ablum by ImageSwitcher.The following is a little demo:package com.slowalker.imageswitcherdemo;import android.os.Bundle;...

2013-11-01 14:01:00 74

转载 Android:Handler

Different Ways to update UI in a none-ui thread:The following is a little demo showing three different ways to update ui in a none-ui thread and the best way i will commend is by a Handler....

2013-10-31 21:50:00 52

转载 Android:View

ViewView's Main Draw Process:1. onMeasure() Called to determine the size requirements for this view and all its children.2. onLayout() Cal...

2013-10-31 12:43:00 91

转载 Android:AlarmManager

AlarmManagerThe AlarmManager is intended for cases where you want to have your application code run at a specific time, even if your application is not currently running.The following little ...

2013-10-30 17:35:00 120

转载 Android:Widget

WidgetIf you have any problem while developing a widget for your android app, the following three articles from google's android api docs are weathy of recommendation:1.《APP Widget Design Gui...

2013-10-24 17:15:00 75

转载 android:WebView

WebViewI read the google's Android api-docs, in the "API Guides" section, 《Building Web Apps in WebView》 is recommendable.转载于:https://www.cnblogs.com/slowalker/p/3385574.html

2013-10-24 10:43:00 73

转载 Android:ViewStub

ViewStub  在开发应用程序时,经常会遇到这样的情况:需要运行时动态地根据条件决定显示哪个View或某个布局。  解决方法1:把可能用到的View都写在上面,通过动态地设置View.GONE来进行控制。  解决方法2:使用android.view.ViewStub实现。  方法1逻辑简单而且控制起来比较灵活。但是它的缺点是耗费资源,即便初始时View的可见性为GON...

2013-10-23 16:57:00 82

转载 Android:Intent.ACTION

Intent.ACTIONTo remember the most useful action of intent, I summarize & record it here.ACTION_MAIN:  Activity Action:Start as a main entry point, does not expect to receive data.ACT...

2013-10-22 19:57:00 161

转载 Java:volatile

Java中的原子性操作与同步问题1.在Java中,原子操作是指不能被线程调度机制中断的操作,一旦操作开始,那么它一定可以在可能发生的"上下文切换"之前(切换到其它线程执行)执行完毕。2.依赖原子性来处理同步问题时很棘手并且很危险的事情。如下面的程序,尽管return i;确实是原子性操作,但是缺少同步使得其数值可以在处于不稳定的中间状态时被读取,尽管变量i添加上了vo...

2013-10-20 17:50:00 72

转载 Java:synchronized

Java的同步机制1.什么时候使用同步呢?可以运用下面的同步规则:如果你在写一个变量,它可能接下来被另一个线程读取;或者你正在读取一个上一次已经被另一个线程写过的变量;那么,你必须使用同步。并且,读写线程都必须用相同的监视器锁进行同步。2.Java以提供关键字synchronized的形式,为防止资源冲突提供了内置支持。当任务要执行被synchronized关键字保护的代码片...

2013-10-20 16:32:00 76

转载 Java:Thread:join()

Java:Thread:join()方法加入一个线程在Java多线程中,如果某一个线程s在另一个线程t上调用t.join(),此线程s将被挂起,直到目标线程t结束才恢复(此时t.isAlive()返回为假)。也可以在调用join()时带上一个超时参数(单位可以是毫秒,或者毫秒和纳秒),这样如果目标线程在这段时间内还没有结束的话,join()方法总能返回。对join()方法的调...

2013-10-19 16:46:00 69

转载 Java:Callable

1. Runnable是执行工作的独立任务,但它不返回任何值。2. 如果你希望任务在完成时能够返回一个值,那么可以实现Callable接口而不是Runnable接口。3. Callable是一个具有类型参数的泛型,它的类型参数返回的是从方法call()中返回的值。除此之外,还必须使用ExecutorService.submit()方法来调用它。4. submit()方法会产生...

2013-10-19 15:16:00 71

转载 Java:ThreadPool

ThreadPool(线程池)在Java中通过Executor可以创建线程池,创建线程池的方式有以下三种:1.ExecutorService exec = Executors.newCachedThreadPool(); CacheThreadPool在程序执行的过程中通常会创建与所需数量相同的线程,然后它回收旧线程的时候停止创建新线程。 因此它是合理的Execu...

2013-10-19 14:43:00 95

转载 Java Executor

Executor(执行器)JavaSE5的java.util.concurrent包中的执行器Executor将为你管理Thread对象,从而简化了并发编程。Executor在客户端和任务执行之间提供了一个间接层,与客户端执行任务不同,这个中介对象将执行任务。Executor允许你管理异步任务的执行,而无须显式地管理线程的生命周期。 1 public class ...

2013-10-19 14:28:00 80

转载 Java:Thread

Thread(线程)将Runnable转换成工作任务的传统方式是把它提交给一个Thread构造器。Thread构造器只需要一个Runnable对象。调用Thread对象的start()方法为该线程执行必须的初始化操作,然后调用Runnable的run()方法,以便在这个新线程中启动该任务。public class ThreadDemo { p...

2013-10-19 11:30:00 192

转载 Java:Runnable

Runnable接口线程可以驱动任务的并发执行,因此需要一种描述任务的方式。描述方式可以由Runnable接口来提供,具体就是通过实现Runnable对象并重写run()方法。 1 public class RunnableDemo { 2 3 public static void main(String[] args) { 4 ...

2013-10-19 11:21:00 126

转载 android:ContentObserver

ContentObserver(内容观察者)1.内容观察者,目的是观察(捕捉)特定Uri引起的数据库的变化,继而做一些相应的处理(重写onChange(boolean selfChange)方法);2.注册内容观察者:registerContentObserver(Uri uri, boolean notifyForDescendents, ContentObserver obs...

2013-10-18 11:07:00 93

转载 android:ContentProvider

ContentProvider1.ContentProvider为存储和读取数据提供了统一的接口;2.使用ContentProvider,应用程序可以实现数据共享;3.android内置的许多数据都是使用ContentProvider形式,供开发者调用的(如视频,音频,图片,通讯录等);4.当应用继承ContentProvider类,并重写该类用于提供数据和存储数据的方法...

2013-10-18 11:02:00 70

转载 android:Uri

Android中Uri类简介Uri uri = Uri.parse("content://com.changcheng.provider.contactprovider/contact")在Content Provider中使用的查询字符串有别于标准的SQL查询。很多诸如select, add, delete, modify等操作我们都使用一种特殊的URI来进行.这种URI由...

2013-10-18 10:58:00 143

转载 Android:FrameLayout

Android FrameLayout(帧布局)FrameLayout是Android布局方式中最简单的一种。在这种布局中:1、整个布局被当作一个空白区域;2、所有子元素都不能被指定放置的位置,全部统一放置在界面的左上角;3、后面的子元素将会覆盖前面的子元素部分(全部)的界面。转载于:https://www.cnblogs.com/slowalker/p/3...

2013-09-25 09:54:00 70

转载 Android:Broadcast

Broadcast(广播机制)广播机制,涉及到的角色有广播发送者和广播的接收者。使用广播必须在配置文件AndroidManifest.xml中显示地指明广播对象。在Android中如果要发送一个广播必须使用sendBroadcast(Intent intent)想系统发送到相应的广播接收者中。使用广播必须要用到Intent对象,必须为Intent对象设置其action动作...

2013-09-24 11:14:00 77

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除