android进阶
文章平均质量分 81
_Tommy_
这个作者很懒,什么都没留下…
展开
-
[Android]自定义组件示例:使用attrs.xml文件定制RadioButton
1.在res/values下创建attrs.xml MyRadioButton为组件名字,随意起,attr标签定义组件的属性,name对应的是属性名,format是属性的类型,具体可参见《[Android]attrs.xml文件中属性类型format值的格式》。2.在自定义的组件中使用attrs.xml文件的定义public class MyRadioBu原创 2011-11-18 20:51:33 · 4302 阅读 · 0 评论 -
[Android]异步任务AsyncTask使用解析
AsyncTask主要用来更新UI线程,比较耗时的操作可以在AsyncTask中使用。AsyncTask是个抽象类,使用时需要继承这个类,然后调用execute()方法。注意继承时需要设定三个泛型Params,Progress和Result的类型,如AsyncTask:Params是指调用execute()方法时传入的参数类型和doInBackgound()的参数类型Progres转载 2011-11-23 13:38:07 · 65718 阅读 · 8 评论 -
使用git按类别下载android源码
git clone https://android.googlesource.com/device/common.gitgit clone https://android.googlesource.com/device/google/accessory/arduino.gitgit clone https://android.googlesource.com/device/google/acc原创 2012-03-26 14:15:11 · 3069 阅读 · 0 评论 -
解决Android Bitmap内存溢出问题
android系统的手机在系统底层指定了堆内存的上限值,大部分手机的缺省值是16MB,不过也有些高配置的机型是24MB的,所以我们的程序在申请内存空间时,为了确保能够成功申请到内存空间,应该保证当前已分配的内存加上当前需要分配的内存值的总大小不能超过当前堆的最大内存值。由于内存管理上将外部内存完全当成了当前堆的一部分,也就是说Bitmap对象通过栈上的引用来指向堆上的Bitmap对象,而堆上的Bi转载 2012-04-07 12:21:14 · 15436 阅读 · 0 评论 -
Adapter中函数的调用顺序
1.BaseExpandableListAdapter使用BaseExpandableListAdapter来创建一个只有一个group,并且组中只有一个item的ExpandableListView,方法的调用情况如下05-29 15:54:16.048: D/adapter(17066): getGroupCount05-29 15:54:16.055: D/adapter(1706原创 2013-05-29 15:56:13 · 3323 阅读 · 0 评论 -
Managing Bitmap Memory
TRY IT OUTDownload the sampleBitmapFun.zipIn addition to {除...之外} the steps described in Caching Bitmaps, there are specific things you can do to facilitate {[fə'sɪlɪteɪt] 帮助,使...更翻译 2013-06-28 22:08:54 · 2969 阅读 · 0 评论 -
Caching Bitmap
Download the sampleBitmapFun.zipLoading a single bitmap into your user interface (UI) is straightforward{[ˌstreɪt'fɔːrwərd] 易懂的,笔直的}, however things get more complicated if you need翻译 2013-06-28 20:28:19 · 2307 阅读 · 0 评论 -
使用 ViewGroup 自定义 SlidingLayout
package com.gfleetplus.footprint.snapshop.ui.worklist;import android.content.Context;import android.util.AttributeSet;import android.view.GestureDetector;import android.view.MotionEvent;import a原创 2014-04-17 14:40:29 · 2890 阅读 · 0 评论 -
APK 代码混淆
# To enable ProGuard in your project, edit project.properties# to define the proguard.config property as described in that file.## Add project specific ProGuard rules here.# By default, the flags原创 2014-04-28 23:36:03 · 3520 阅读 · 0 评论