
Android
文章平均质量分 75
老鼠爸爸
对linux感兴趣
展开
-
Content provide & content resolver comments
1. 相关类Uri.BuilderUriUriMatcher : 设计的不错ContentUris : 对最后的path部分的解析和附加ContentsValues : 基本上的parcelable的hashmapParcelFileDescriptor: 传递fd与parcelableAssetFileDescriptor : 除了Parce翻译 2015-11-03 16:09:25 · 394 阅读 · 0 评论 -
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 · 334 阅读 · 0 评论 -
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 · 437 阅读 · 0 评论 -
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 · 424 阅读 · 0 评论 -
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 · 307 阅读 · 0 评论 -
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 · 399 阅读 · 0 评论 -
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 · 355 阅读 · 0 评论 -
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 · 382 阅读 · 0 评论 -
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 · 297 阅读 · 0 评论 -
ASyncTask comments
1. GeneralASyncTask 短时间运行的任务。不在UI 线程中运行。结束时把结果传回UI线程。有3个参数: 1。 Params, Progress and ResultParams是任务需要的参数,result是任务执行的结果,Progress是任务执行的过程提示有4个步骤:onPreExecute, doInBackground, onProgressUpdate翻译 2016-01-04 15:26:45 · 307 阅读 · 0 评论 -
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 · 371 阅读 · 0 评论 -
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 · 473 阅读 · 0 评论 -
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 · 268 阅读 · 0 评论 -
Cursor comments
SQLiteCursor -> AbstractWindowCursor -> AbstractCursor -> CrossProcessCursormaxtrixCursor -> AbstractCursor-> CrossProcessCursorAbstractCursor -> CrossProcesssCursor -> CursorCrossProcessCursorW翻译 2015-11-03 16:55:41 · 307 阅读 · 0 评论 -
理解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 · 699 阅读 · 0 评论 -
intent ,intent filter comments
Intent翻译 2015-10-28 11:26:24 · 305 阅读 · 0 评论 -
Tobedone
1。Activity and fragment2。Setting3。JNI4。View/Surfaceview/viewgroup5。翻译 2015-11-12 11:54:20 · 352 阅读 · 0 评论 -
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 · 583 阅读 · 0 评论 -
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 · 288 阅读 · 0 评论 -
Context comments
1. 启动其他app components2. 权限检查3. 本应用私有的文件,数据库,目录管理和定位4. 资源的获取5. theme 6. 系统服务对象获取7.翻译 2015-10-27 14:48:41 · 286 阅读 · 0 评论 -
r.style r.styleable r.attr
1. ??翻译 2015-10-27 15:40:59 · 431 阅读 · 0 评论 -
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 · 284 阅读 · 0 评论 -
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 · 540 阅读 · 0 评论