use of com.nightonke.saver.adapter.DialogTagChooseGridViewAdapter in project CoCoin by Nightonke.
the class AccountBookListViewActivity method setTag.
private void setTag() {
tagSelectDialog = new MaterialDialog.Builder(this).title(R.string.set_tag).customView(R.layout.dialog_select_tag, false).negativeText(R.string.cancel).show();
tagSelectDialogView = tagSelectDialog.getCustomView();
myGridView = (MyGridView) tagSelectDialogView.findViewById(R.id.grid_view);
dialogTagChooseGridViewAdapter = new DialogTagChooseGridViewAdapter(mContext);
myGridView.setAdapter(dialogTagChooseGridViewAdapter);
myGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
tagSelectDialog.dismiss();
TAG_ID = RecordManager.getInstance(mContext).TAGS.get(position + 2).getId();
tagImage.setImageDrawable(CoCoinUtil.GetTagIconDrawable(TAG_ID));
tagName.setText(CoCoinUtil.GetTagName(TAG_ID));
}
});
}
Aggregations