Created
June 26, 2020 08:07
-
-
Save virendersran01/8f929a956d23dd0a7f0974b23a9dda2c to your computer and use it in GitHub Desktop.
Live Template for Recyclerview's Adapter Class Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class $ADAPTERNAME$ extends androidx.recyclerview.widget.RecyclerView.Adapter<$ADAPTERNAME$.ViewHolder> { | |
@androidx.annotation.NonNull | |
@Override | |
public ViewHolder onCreateViewHolder(@androidx.annotation.NonNull android.view.ViewGroup parent, int viewType) { | |
return new ViewHolder(android.view.LayoutInflater.from(parent.getContext()).inflate(R.layout.$LAYOUT$, parent, false)); | |
} | |
@Override | |
public void onBindViewHolder(@androidx.annotation.NonNull ViewHolder holder, int position) { | |
} | |
@Override | |
public int getItemCount() { | |
return 0; | |
} | |
static class ViewHolder extends RecyclerView.ViewHolder { | |
public ViewHolder(@androidx.annotation.NonNull android.view.View itemView) { | |
super(itemView); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment