Search in sources :

Example 1 with DialogTagChooseGridViewAdapter

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));
        }
    });
}
Also used : MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) DialogTagChooseGridViewAdapter(com.nightonke.saver.adapter.DialogTagChooseGridViewAdapter) AdapterView(android.widget.AdapterView) MaterialSearchView(com.miguelcatalan.materialsearchview.MaterialSearchView) ImageView(android.widget.ImageView) CircleImageView(de.hdodenhof.circleimageview.CircleImageView) View(android.view.View) MyGridView(com.nightonke.saver.ui.MyGridView) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) BaseSliderView(com.daimajia.slider.library.SliderTypes.BaseSliderView) CustomSliderView(com.nightonke.saver.ui.CustomSliderView) RecyclerView(android.support.v7.widget.RecyclerView)

Aggregations

RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)1 BaseSliderView (com.daimajia.slider.library.SliderTypes.BaseSliderView)1 MaterialSearchView (com.miguelcatalan.materialsearchview.MaterialSearchView)1 DialogTagChooseGridViewAdapter (com.nightonke.saver.adapter.DialogTagChooseGridViewAdapter)1 CustomSliderView (com.nightonke.saver.ui.CustomSliderView)1 MyGridView (com.nightonke.saver.ui.MyGridView)1 CircleImageView (de.hdodenhof.circleimageview.CircleImageView)1