Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.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
Java 回收器视图适配器内无法识别Android EXTRA_消息_Java_Android_Android Intent - Fatal编程技术网

Java 回收器视图适配器内无法识别Android EXTRA_消息

Java 回收器视图适配器内无法识别Android EXTRA_消息,java,android,android-intent,Java,Android,Android Intent,我有一个管理卡片视图的回收器视图适配器。卡片上有一个按钮,可以启动另一个活动 但是,由于某些原因,无法识别额外的_消息。我已经在我的主要活动中定义了它,所以我不确定问题出在哪里。代码如下: @Override public void onBindViewHolder(final View_Holder holder, final int position) { //Use the provided View Holder on the onCreateViewHolder method

我有一个管理卡片视图的回收器视图适配器。卡片上有一个按钮,可以启动另一个活动

但是,由于某些原因,无法识别额外的_消息。我已经在我的主要活动中定义了它,所以我不确定问题出在哪里。代码如下:

@Override
public void onBindViewHolder(final View_Holder holder, final int position) {

    //Use the provided View Holder on the onCreateViewHolder method to populate the current row on the RecyclerView
    holder.name.setText(list.get(position).name);
    holder.number.setText("Character # " + list.get(position).number);
    holder.imageView.setImageBitmap(decodeSampledBitmapFromResource(context.getResources(), (list.get(position).imageId), 60, 60));

    holder.fullbutton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = new Intent(context, CardFullView.class);
            intent.putExtra(Intent.EXTRA_MESSAGE, list.get(position));
            context.startActivity(intent);
        }
    });
以及MainActivity.java中的定义

 public final static String EXTRA_MESSAGE = "com.package.name.MESSAGE";
改变

Intent.EXTRA_MESSAGE

MainActivity.EXTRA_MESSAGE