use of com.cometchat.pro.uikit.ui_components.shared.cometchatStickers.adapter.StickersAdapter in project android-java-chat-push-notification-app by cometchat-pro.
the class StickerFragment method onCreateView.
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_stickers_view, container, false);
rvStickers = view.findViewById(R.id.rvStickers);
rvStickers.setLayoutManager(new GridLayoutManager(getContext(), 4));
Id = this.getArguments().getString("Id");
type = this.getArguments().getString("type");
List<Sticker> list = this.getArguments().getParcelableArrayList("stickerList");
stickers = list;
Log.e("onStickerView: ", stickers.get(0).getSetName());
adapter = new StickersAdapter(getContext(), stickers);
rvStickers.setAdapter(adapter);
rvStickers.addOnItemTouchListener(new RecyclerTouchListener(getContext(), rvStickers, new ClickListener() {
@Override
public void onClick(View var1, int var2) {
Sticker sticker = (Sticker) var1.getTag(R.string.sticker);
stickerClickListener.onClickListener(sticker);
}
}));
return view;
}
Aggregations