小编AK *_*jua的帖子

无法解析方法'putExtra(android.os.bundle)'

在片段里面 onCreateView

putExtra(dataBundle);
Run Code Online (Sandbox Code Playgroud)

无法解决方法'putExtra(android.os.bundle)'错误

putExtra("id", id_To_Search);
Run Code Online (Sandbox Code Playgroud)

工作良好.我想发送dataBunle指导我,我错过了什么.

@Override
            public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
                int id_To_Search = position + 1;
            Bundle dataBundle = new Bundle();
            dataBundle.putInt("id", id_To_Search);

            Intent intent = new Intent(getActivity(), DetailActivity.class).putExtra(dataBundle);
            startActivity(intent);
        }
Run Code Online (Sandbox Code Playgroud)

android bundle android-intent

0
推荐指数
1
解决办法
5019
查看次数

标签 统计

android ×1

android-intent ×1

bundle ×1