Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 我的项目有两个问题:1)将字符串值从一个活动传递到另一个活动;2)OnPost Execute对话框中的Listview_Android_Database_Listview_Android Intent - Fatal编程技术网

Android 我的项目有两个问题:1)将字符串值从一个活动传递到另一个活动;2)OnPost Execute对话框中的Listview

Android 我的项目有两个问题:1)将字符串值从一个活动传递到另一个活动;2)OnPost Execute对话框中的Listview,android,database,listview,android-intent,Android,Database,Listview,Android Intent,我正在尝试在Android上做一个简单的数据库项目。我的项目有两个问题: 我想将字符串值从第一个活动传递到第二个活动 在这两个活动中,将字符串值传递给第三个活动。我 无法在第三个活动中获取字符串值。检查一下,我有一个 打印sts,但未报告任何内容。没有抛出错误 我想在第二个活动的对话框内的列表视图中显示数据 触发OnPostExecute时。我有一个错误,但我只是用一个 阵列适配器。它显示成功 我做错了什么 查看我的代码 将值从活动传递到活动 在开始活动之前使用Intent.putExtra 像

我正在尝试在Android上做一个简单的数据库项目。我的项目有两个问题:

  • 我想将字符串值从第一个活动传递到第二个活动 在这两个活动中,将字符串值传递给第三个活动。我 无法在第三个活动中获取字符串值。检查一下,我有一个 打印sts,但未报告任何内容。没有抛出错误
  • 我想在第二个活动的对话框内的列表视图中显示数据 触发
    OnPostExecute
    时。我有一个错误,但我只是用一个
    阵列适配器
    。它显示成功
  • 我做错了什么


    查看我的代码

    将值从活动传递到活动 在开始活动之前使用Intent.putExtra 像下面这样

    `Intent intent = new Intent(getApplicationContext(), NewActivty.class);
    intent.putExtra("Key", "Value");
    startActivity(intent);` 
    
    在下一个活动中,使用getExtra接收它

     Bundle getValue= getIntent().getExtras();
    
     if(GetValue!=null);
    
     String GetIntentValue= GetValue.getExtras("Key");
    
    在头等舱

    Intent Intent=新的Intent(这个,nextclass.class)

    intent=putExtra(“您的_键”,yourstringhere)

    startActivity(意图)

    论接受类

    Bundle data=getIntent().getExtras()

    if(数据!=null)

    String receiver=data.getExtras(“您的_键”)


    祝你好运。

    在第一个活动中,我在第二个活动中得到了值,在第三个活动中得到了值。请参阅我的代码。我是对的,或者我应该做什么改变。。