共 3 篇文章 |
|
Android实战技巧之二十八:启动另一个App/apk中的Activity.public void OnStartActivityClicked(View view) { Intent intent = new Intent(Intent.//second method// intent.setComponent(new ComponentName(// "com.lazytech.projecta",// "com.lazytech.projecta.MainActivity"// ));intent.putExtra("pid", a... 阅956 转2 评0 公众公开 15-05-21 09:14 |
// 在Intent中传递数据 intent.putExtra("name", "AHuier"); intent.putExtra("age", 22); intent.putExtra("address", "XiaMen"); // 启动Intent startActivity(intent); } ... 阅9308 转41 评0 公众公开 15-05-21 09:14 |
android使用Intent传递数据 2 种方式(Intent和Bundle)在两个Activity之间传递数据,最终都是通过Intent传递,但设置数据和保存数据方式有两种(使用Intent 和 Bundle),分别对应如下:Intent intent = new Intent(MainActivity.this,OtherActivity.class);Bundle bundle = new Bundle();方法一:直接用Intent , String nameString = intent.get... 阅516 转4 评0 公众公开 15-05-21 09:14 |