Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/194.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 如何使用Cardview在RecycleServiceAdapter中使用Intent_Android_Android Intent_Android Recyclerview - Fatal编程技术网

Android 如何使用Cardview在RecycleServiceAdapter中使用Intent

Android 如何使用Cardview在RecycleServiceAdapter中使用Intent,android,android-intent,android-recyclerview,Android,Android Intent,Android Recyclerview,请帮助我创建cardview的意图,但我无法在RecycleServiceAdapter中使用意图是的,如果要使用意图,需要上下文。 public RecyclerViewAdapter(Context context,List<Cards> items, int itemLayout) { this.mContext = context; this.items = items; this.itemLayout= itemLay

请帮助我创建cardview的意图,但我无法在RecycleServiceAdapter中使用意图是的,如果要使用意图,需要上下文。
public RecyclerViewAdapter(Context context,List<Cards> items, int itemLayout)
    {
        this.mContext = context;
        this.items = items;
        this.itemLayout= itemLayout;
    }
...
Intent intent = new Intent(mContext, YOUR_ACTIVITY.class);
mContext.startActivity(intent)
在建筑中你可以通过一个

public RecyclerViewAdapter(Context context,List<Cards> items, int itemLayout)
    {
        this.mContext = context;
        this.items = items;
        this.itemLayout= itemLayout;
    }
Intent intent = new Intent(mContext, YOUR_ACTIVITY.class);
mContext.startActivity(intent)