摘要:
阅读全文
posted @ 2016-04-12 22:45
zhongyinghe
阅读(94)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2016-04-12 22:44
zhongyinghe
阅读(125)
评论(0)
推荐(0)
摘要:
1、清单文件第二个activity<activity android:name="com.example.twodatapass.ResultActivity" android:label="@string/app_name" > </activity>2、程序文件1)激活方String name 阅读全文
posted @ 2016-04-12 22:39
zhongyinghe
阅读(236)
评论(0)
推荐(0)
摘要:
例如:我想激活短信应用,代码如下: 使用区别:如果在同一个应用中激活自己的东西,则应该使用显式意图,因为效率高而如果要激活其他的应用,则应该使用隐式意图; 总之,显示意图性能较好,而隐式意图性能差点,主要原因是它有一个寻找过程,这是耗性能的地方。如果找到多个,则让你选择;如果找到一个,则直接显示。 阅读全文
posted @ 2016-04-12 22:36
zhongyinghe
阅读(199)
评论(0)
推荐(0)
摘要:
1、清单文件 2、开启该activity的代码 3、获取到激活它的意图 注意:如果在清单文件中配置有 <data android:scheme="itheima" ></data>,则在激活意图时必须有intent.setData(Uri.parse("itheima:xxx"));这样的设置,否则 阅读全文
posted @ 2016-04-12 22:30
zhongyinghe
阅读(229)
评论(0)
推荐(0)
摘要:
1 Intent intent = new Intent(); 2 intent.setAction(Intent.ACTION_VIEW);//设置动作 3 intent.setData(Uri.parse("http://www.baidu.com/"));//设置uri 4 startActivity(intent); 阅读全文
posted @ 2016-04-12 22:26
zhongyinghe
阅读(133)
评论(0)
推荐(0)
摘要:
1、清单文件<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>2、代码@Overrideprotected void onStart() { // TODO Auto-generated method s 阅读全文
posted @ 2016-04-12 22:24
zhongyinghe
阅读(178)
评论(0)
推荐(0)
摘要:
1、如何获取其他应用的包名和类名? 点击和查看logcat第一条信息2、第二步Intent intent = new Intent();intent.setClassName("com.android.gallery", "com.android.camera.GalleryPicker");sta 阅读全文
posted @ 2016-04-12 22:18
zhongyinghe
阅读(101)
评论(0)
推荐(0)
摘要:
1、前单文件 2、点击事件 3、继承activity的类要实现的方法 注: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.cate 阅读全文
posted @ 2016-04-12 22:15
zhongyinghe
阅读(162)
评论(0)
推荐(0)

浙公网安备 33010602011771号