变量引用是变量的别名,常量引用要加const,引用与被引用的东西是同一样。#include #include #include #include #include // using declarations states our intent to use these names fro...
分类:
编程语言 时间:
2014-08-15 22:24:09
阅读次数:
294
1:命名空间2:C与C++字符串的区别和基本操作3:枚举类型命名空间#include #include #include #include #include // using declarations states our intent to use these names from t...
分类:
编程语言 时间:
2014-08-15 17:44:19
阅读次数:
312
Intent intent1 = getIntent();
overridePendingTransition(0, 0);
intent1.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
finish();
overridePendingTransition(0, 0);
startActivity(intent1);
...
分类:
移动开发 时间:
2014-08-15 14:40:18
阅读次数:
224
原理 其实android系统在耳机插入和拔出的时候都会发送广播,所以我们要想检测耳机的状态只需要注册响应的BroadCastReceiver,对状态进行响应的判断就ok了。这个广播的名字叫做:android.intent.action.HEADSET_PLUGCode package com.yyd...
分类:
移动开发 时间:
2014-08-15 14:31:48
阅读次数:
195
Android系统自带下载管理(DownloadManager) 进度监听 通过内容观察者实现. 完成时的监听通过广播接受者实现. intent.getAction().equals(DownloadManager. ACTION_DOWNLOAD_COMPLETE) bug4.4三星 java.l...
分类:
移动开发 时间:
2014-08-15 09:22:57
阅读次数:
197
Intent作为联系各Activity之间的纽带,其作用并不仅仅只限于简单的数据传递。通过其自带的属性,其实可以方便的完成很多较为复杂的操作。例如直接调用拨号功能、直接自动调用合适的程序打开不同类型的文件等等。诸如此类,都可以通过设置Intent属性来完成。 Intent主要有以下四个重要属性...
分类:
其他好文 时间:
2014-08-14 23:20:46
阅读次数:
271
代码 /** * * 返回添加到桌面快捷方式的Intent: * * 1.给Intent指定action="com.android.launcher.INSTALL_SHORTCUT" * * 2.给定义为Intent.EXTRA_SHORTCU...
分类:
移动开发 时间:
2014-08-14 13:58:58
阅读次数:
204
今天在看log的时候发现,Launcher activity会被onDestroy掉一次,然后再重启。
可能原因猜测:
1.横竖屏切换
2.MCC MNC等Configuration改变引起的 MCC(移动国家码)和 MNC(移动网络码)
由于当时的Launcher设置为强制横屏了,应该是不会引起重启的。
对于Configuration改变系统会发一个android.intent...
分类:
其他好文 时间:
2014-08-13 19:05:57
阅读次数:
215
核心代码:
....
// launcher应用中包含的xml配置
String action = Intent.ACTION_MAIN;
String category1 = Intent.CATEGORY_HOME;
String category2 = Intent.CATEGORY_DEFAULT;
IntentFilter filter = new IntentFil...
分类:
其他好文 时间:
2014-08-13 10:36:16
阅读次数:
192
Android 简介 开始入手 创建应用程序和Activity 创建用户界面 Intent 和 Broadcast Revicever 使用 Internet 资源 文件,保存状态和首选项 数据库和Content Provider 在后台操作 扩展用户体验 高级用户体验 硬件传感器 地图,地理编码和...
分类:
移动开发 时间:
2014-08-13 10:17:55
阅读次数:
165