本文整理汇总了Java中com.lqr.ninegridimageview.LQRNineGridImageView类的典型用法代码示例。如果您正苦于以下问题:Java LQRNineGridImageView类的具体用法?Java LQRNineGridImageView怎么用?Java LQRNineGridImageView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LQRNineGridImageView类属于com.lqr.ninegridimageview包,在下文中一共展示了LQRNineGridImageView类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setAdapter
import com.lqr.ninegridimageview.LQRNineGridImageView; //导入依赖的package包/类
private void setAdapter() {
if (mAdapter == null) {
mAdapter = new LQRAdapterForRecyclerView<Groups>(mContext, mData, R.layout.item_contact) {
@Override
public void convert(LQRViewHolderForRecyclerView helper, Groups item, int position) {
LQRNineGridImageView ngvi = helper.setViewVisibility(R.id.ngiv, View.VISIBLE)
.setViewVisibility(R.id.ivHeader, View.GONE)
.setText(R.id.tvName, item.getName())
.getView(R.id.ngiv);
ngvi.setAdapter(mNgivAdapter);
List<GroupMember> groupMembers = DBManager.getInstance().getGroupMembers(item.getGroupId());
ngvi.setImagesData(groupMembers);
}
};
mAdapter.setOnItemClickListener((lqrViewHolder, viewGroup, view, i) -> {
Intent intent = new Intent(mContext, SessionActivity.class);
intent.putExtra("sessionId", mData.get(i).getGroupId());
intent.putExtra("sessionType", SessionActivity.SESSION_TYPE_GROUP);
mContext.jumpToActivity(intent);
mContext.finish();
});
getView().getRvGroupList().setAdapter(mAdapter);
} else {
mAdapter.notifyDataSetChangedWrapper();
}
}