- 授权协议: 未知
- 开发语言: Java
- 操作系统: Android
- 软件首页: https://github.com/liaohuqiu/android-ActionQueue
软件介绍
ActionQueue 允许你一个一个的执行任务。
导入:
allprojects {
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
jcenter()
}
}加依赖:
compile 'in.srain.cube:action-queue:1.0.1'
使用
创建 action:
String[] messageList = new String[]{
"message 1",
"message 2",
"message 3",
};
for (int i = 0; i < messageList.length; i++) {
String message = messageList[i];
PopDialogAction action = new PopDialogAction(message);
mActionQueue.add(action);
}处理 action:
class PopDialogAction extends ActionQueue.Action<String> {
public PopDialogAction(String badge) {
super(badge);
}
@Override
public void onAction() {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
Dialog dialog = builder.setMessage(getBadge()).show();
// notify action is done, and next aciton will be executed
dialog.setOnDismissListener(mOnDismissListener);
}
}action 执行完之后通知提醒:
DialogInterface.OnDismissListener mOnDismissListener = new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
mActionQueue.notifyActionDoneThenTryToPopNext();
}
};
30天自制操作系统
[日] 川合秀实 / 周自恒、李黎明、曾祥江、张文旭 / 人民邮电出版社 / 2012-8 / 99.00元
自己编写一个操作系统,是许多程序员的梦想。也许有人曾经挑战过,但因为太难而放弃了。其实你错了,你的失败并不是因为编写操作系统太难,而是因为没有人告诉你那其实是一件很简单的事。那么,你想不想再挑战一次呢? 这是一本兼具趣味性、实用性与学习性的书籍。作者从计算机的构造、汇编语言、C语言开始解说,让你在实践中掌握算法。在这本书的指导下,从零编写所有代码,30天后就可以制作出一个具有窗口系统的32位......一起来看看 《30天自制操作系统》 这本书的介绍吧!
