INNER CODE UNIT · Java
ColorPickerAdapter
prscX/react-native-photo-editor · android/src/main/java/com/ahmedadeltito/photoeditor/ColorPickerAdapter.java:23
public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter.ViewHolder> {
private Context context;
private LayoutInflater inflater;
private List<Integer> colorPickerColors;
private OnColorPickerClickListener onColorPickerClickListener;
public ColorPickerAdapter(@NonNull Context context, @NonNull List<Integer> colorPickerColors) {
this.context = context;
this.inflater = LayoutInflater.from(context);
this.colorPickerColors = colorPickerColors;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = inflater.inflate(R.layout.color_picker_item_list, parent, false);
return new ViewHolder(view);
}