摘要:
线程介绍: 线程是在进程中的一个实体,是被系统调度和分配的基本单位,线程没有系统资源,多个线程共享所属进程的数据。一个线程可以开启和撤销进程中的另一个进程。 线程的三个基本状态:就绪、运行、阻塞。 实现的两种方式: Mythread继承Thread类--〉有一个方法run(),run()中的方法为新 阅读全文
摘要:
在练习数据绑定时,出现以下错误 FATAL EXCEPTION: main Process: com.vogella.android.databinding, PID: 8332 android.content.res.Resources$NotFoundException: String reso 阅读全文
摘要:
1.Using lists or grids in Android App中使用 list 和 grid 是比较普遍的显示元素的的模式。 用户与条目的交互是通过触摸和工具栏。每一个条目被选择,可以显示个下拉框或进入一个详细的关于该条目的页面。 2. Using RecyclerView Recycl 阅读全文
摘要:
android6 API23之前,应用的一系列授权都在安装的时候。 23之后允许在 安装之后打开app才请求权限。 检查 Permission 用户授予权限后 回调: 阅读全文
摘要:
public class Task { public final long id; public String summary; public String description; public boolean done; public Task(long id,String summary,String description, boolean do... 阅读全文
摘要:
2. 在layout 文件中 添加一个 Spinner 控件。 2. 在代码中使用 ArrayAdapter 来适配其中的内容。 例如 阅读全文
摘要:
Notification noti = new Notification.Builder(this) .setContentTitle(methodName + " " + strings[strings.length - 1]) //设置Notification标题, .setAutoCancel(true) ... 阅读全文
摘要:
LRU Cache 一个list 存放最近使用的应用的清单。 Application 生命周期 onCreate() 开启应用第一个组件之前调用。 onLowMemory() android 系统请求这个应用释放内存是调用。 onTrimMemory() onTerminate() 仅在测试时有效。 阅读全文
摘要:
InputStream: 字节流,以字节的形式来进行I/O操作。 InputStreamReader: 字节流和字符流得中间桥梁,指定字符集,把字节转化为字符。 BufferedReader: 读取字符数据放在一个缓冲区,readLine()方法以行的形式来读取文本。 BufferedReader( 阅读全文
摘要:
Explicit Intent 明确的意图,明确指定开启某个Activity。 Intent intent = New Intent (this , 指定的Activity); 共享Intent 把Intetn的动作类型设为 :Intent.ACTION_SEND 即:Intent.setActio 阅读全文