- 博客(31)
- 收藏
- 关注
翻译 com.example.android.hcgallery 分析
com.example.android.hcgallery 是一个简单的android SDK程序,完成功能是把图像分类,按类别进行分类显示。1:在UI上使用tab来组织各个类别;2:按listView选择图像3:可共享图片。所以此程序主要有3个功能。另外图片拖动的功能不分析。一个比较小的功能是图片的全屏显示与否。1。 数据源的相关类没太多特别的地方mCategories = ne
2016-01-11 15:23:45
530
翻译 ASyncTask comments
1. GeneralASyncTask 短时间运行的任务。不在UI 线程中运行。结束时把结果传回UI线程。有3个参数: 1。 Params, Progress and ResultParams是任务需要的参数,result是任务执行的结果,Progress是任务执行的过程提示有4个步骤:onPreExecute, doInBackground, onProgressUpdate
2016-01-04 15:26:45
301
翻译 Fragment comments
1. Fragment 实现一个UI, 可在activity之间共享 实现一个逻辑2. Fragment 在activity的控制下,没有activity不能活动3. 引入Fragment要解决的问题 Fragment和activity的通信 Fragment之间的通信 Fragment 和back stack F
2015-12-31 16:47:23
290
翻译 draw comments
画图四元组:To draw something, you need 4 basic components: A Bitmap to hold the pixels,a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, text, Bitma
2015-11-25 12:34:53
378
翻译 Dialog comments
1. 使用 DialogFragment2。DialogInterface 提供事件处理接口和dismiss()和cancel()接口3。Diaglog implements DialogInterface 。 findViewbyID and setContentView(),show()4。AlertDialog setView5。AlertDialog.Buil
2015-11-16 13:30:48
305
翻译 Setting comments
1. SharedPreferences: 访问所有配置的接口2. Preference:UI for 一个配置3。PreferenceActivity/PreferenceFragment: 显示多个Preference4。Preference可以组成group,用header或titles组织5。PereferenceManager: XML --> SharedPr
2015-11-13 16:25:44
282
翻译 Action Bar comments
1. Action bar 内容 app icon view control action icon action overflow 2. Split Action Bar :一行action bar放不下时 在activity的manifest 文件中定义uiOptions="splitActionBarWhenNarrow" 可以吧top
2015-11-13 10:59:10
266
翻译 Tobedone
1。Activity and fragment2。Setting3。JNI4。View/Surfaceview/viewgroup5。
2015-11-12 11:54:20
349
翻译 Menu comments
1. 3 种menuOption Menu, 显示在action bar上,不支持checked/radio buttonContextual Menu: 适用于listview/gridview 对其中的item操作Contextual Menu contextual action mode : 占action bar的空间,在listview中可以一次对多个list it
2015-11-12 11:23:12
337
翻译 理解Contact的关键图
1。 附图为理解Contact的关键查看数据库sqlite> .table_sync_state phone_lookup view_data_usage_stat _sync_state_metadata photo_files view_entities
2015-11-05 11:55:19
688
翻译 Cursor comments
SQLiteCursor -> AbstractWindowCursor -> AbstractCursor -> CrossProcessCursormaxtrixCursor -> AbstractCursor-> CrossProcessCursorAbstractCursor -> CrossProcesssCursor -> CursorCrossProcessCursorW
2015-11-03 16:55:41
305
翻译 Content provide & content resolver comments
1. 相关类Uri.BuilderUriUriMatcher : 设计的不错ContentUris : 对最后的path部分的解析和附加ContentsValues : 基本上的parcelable的hashmapParcelFileDescriptor: 传递fd与parcelableAssetFileDescriptor : 除了Parce
2015-11-03 16:09:25
390
翻译 Binder Class relation ship
public interface ICat extends android.os.IInterface{ public java.lang.String getColor() throws android.os.RemoteException; public double getWeight() throws android.os.RemoteException;/* 对于服务端
2015-11-02 15:45:11
352
翻译 Service comments
1. service 只适合explicit调用2. service应该使用自己的线程,要不同一线程的service会干扰activity的响应。3. 除了跨进程的service,看不出本地service有太多的意义,用线程也能解决。4. 系统可在oom时kill service,在内存允许是重启service,用户可定义如何,是否重启服务4。1 不重启4。2 重启,但提供有一
2015-11-02 11:40:32
395
翻译 Notification and Toast comments
1。 NotificationNotification area & Notification DrawAPI20 支持 heads-up notification有以下显示形式1。最简单的icon,title和content text2。系统定义的styleNotificationCompat.BuildersetStyle(Notificat
2015-10-30 17:13:58
331
翻译 Parcel , Parcelable, Bundle,
Parcel: 存放可parcel的容器,提供接口读写1。 基本的类型和基本类型的数组2。Parcelable和Parcelable的数组3。Bundle (Bundle本身实现了Parcelable接口) (Bundle中value必须为可写入到Parcel中)4。Active Object:For these objects the actual contents of
2015-10-30 14:25:49
419
翻译 MessageQueue, Looper, Thread, Handler, Message, Messenger
1. 除mainThread,新创建的线程读没有looper,使用Looper.prepare()创建,同时也创建了MessageQueueHandler关联于looper,使用Handler的消息发送接口发送消息到关联的Looper的MessageQueue,底层发送消息的接口是MessageQueue.IdleHandler 可以通过Looper获得 Messag
2015-10-30 11:24:13
434
翻译 manage task comments
concepts 1.1 Overview Screen : The overview screen (also referred to as the recents screen, recent task list, or recent apps) is a system-level UI that lists recently accessed activities and tasks. Th
2015-10-29 14:56:03
365
翻译 permission comments
1. permission 定义 android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY" android:label="@string/permlab_deadlyActivity" android:description="@string/permdesc_deadlyActivity"
2015-10-27 15:35:59
468
翻译 Context comments
1. 启动其他app components2. 权限检查3. 本应用私有的文件,数据库,目录管理和定位4. 资源的获取5. theme 6. 系统服务对象获取7.
2015-10-27 14:48:41
284
翻译 Adaptive to the device and user Device Compatibility , language configuration comments
=============================== 硬件feature2。 运行时检测设备配置,动态disable不支持的feature2。1 在manifest中描述要使用的feature,让平台来判断 android:name="android.hardware.sensor.compass" android:requir
2015-10-27 11:22:32
578
翻译 Android App basic comments
1. Introduction : 应用提供多个程序入口点(component)。 不同与其他的java程序。 使用intenet启用其他程序构件(component)。1.1 App (构件,描述和资源) 每个app有不同的linux用户id 安装时赋予权限而不是在执行时1。1。1 4种基本应用构件。 1。
2015-10-27 10:20:59
284
翻译 ip command examples
vlan# ip link add link eth0 name eth0.100 type vlan id 100Vethip link add name n1.0.1 type veth peer name n1.0ip link add name n1.0.1 type veth peer name n1.0Can# ip link set can0 up t
2014-03-11 16:29:40
3301
翻译 Apache URL rewirting and translation
Problem: 1. Symbol link and 2. ../.. 3. Directory instead of files 4. http://www.example.com/~user/file.html 5.Redirectiong 6.File not foundDocumentRoot Alias1.
2014-02-24 13:43:34
512
翻译 apache virtual host
1. Two virtual host ways. 1, Name-based: client tell the name, server use name to dispatch request to different translation 2. IP-based: server different in IP address or port
2014-02-24 11:34:05
569
翻译 Apache General
Apache Function:1. as normal http server 1.1 URL rewrite and mapping2. as Proxy 3. virtual host1. Auth and access control2. dynamically contents1. Log 2. Performance tunin
2014-02-24 09:49:53
356
翻译 Java thread notes
Thread : 基本的调度实体。Runnable: 可执行的实体,是Thread中的运行实体。不直接返回对象,可通过改其他对象来提供运行结果Callable: 可执行的实体,包含了所有的可执行信息。不可以直接和线程相连。直接返回对象。Future:异步运行的结果,等待此结果和检测此结果可用行,取消运行的接口。RunnableFuture: 支持Runnable接口
2014-02-21 16:43:40
518
翻译 Apache configuraion file
httpd.conf-f command line flag指定配置文件IncludeTypesConfig directive, 定义a file containing mime document types mime.types Define 定义变量${VAR}可被扩展,VAR可为读httpd.conf前的环境变量。也可为Define定义的变量SetE
2014-02-18 15:54:46
634
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人