I'm following a tutorial about RecyclerView, but I can't write ct:
the way he did. I typed in manually, but it does not work. I'm not sure how he typed it. He typed in this
, then android studio writes ct:
automatically. What do I need to type to do that?
MyAdapter is a class I created for RecyclerView. Here is the code for that class:
public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> {
//Variables
String game_Name[], game_Description[];
int img[];
Context context;
//Constructor
public MyAdapter(Context ct, String gameName[], String gameDescription[], int images[]){
context = ct;
game_Name = gameName;
game_Description = gameDescription;
img = images;
}
//Method
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
//Method
@Override
public void onBindViewHolder(@NonNull MyAdapter.MyViewHolder holder, int position) {
}
//Method
@Override
public int getItemCount() {
return 0;
}
public class MyViewHolder extends RecyclerView.ViewHolder{
public MyViewHolder(@NonNull View itemView) {
super(itemView);
}
}
}