我正在尝试在Android上执行一个简单的数据库项目。我的项目有两个问题:
OnPostExecute
被触发时。我收到了一个错误,但我只是做了一个错误
arrayadapter
。它显示成功。我做错了什么?
查看我的代码here。
答案 0 :(得分:1)
将值从Activity传递给Activity 在启动Activity之前使用Intent.putExtra 喜欢这个
`Intent intent = new Intent(getApplicationContext(), NewActivty.class);
intent.putExtra("Key", "Value");
startActivity(intent);`
并在下一个Activty Recive上使用getExtra
Bundle getValue= getIntent().getExtras();
if(GetValue!=null);
String GetIntentValue= GetValue.getExtras("Key");
答案 1 :(得分:0)
在第一堂课
Intent intent = new Intent(this, nextclass.class);
intent = putExtra("YOUR_KEY" , yourstringhere);
startActivity(intent);
在接收班上
Bundle data = getIntent().getExtras();
if(data!=null);
String receiver = data.getExtras("YOUR_KEY");
古德勒克。