本文整理匯總了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();
}
}