Exemple #1
0
 private void initViewHoder(int type) {
   mTvTitle.setText(mItem.getTitle());
   if (StrUtils.isEmpty(mItem.getSummary())) {
     mTvSummary.setVisibility(View.GONE);
   } else {
     mTvSummary.setText(mItem.getSummary());
     mTvSummary.setVisibility(View.VISIBLE);
   }
   if (StrUtils.isEmpty(mItem.getAlerm())) {
     mTvAlerm.setVisibility(View.GONE);
   } else {
     mTvAlerm.setText(mItem.getAlerm());
     mTvAlerm.setVisibility(View.VISIBLE);
   }
   if (StrUtils.isEmpty(mItem.getState())) {
     mTvState.setVisibility(View.GONE);
   } else {
     mTvState.setText(mItem.getState());
     mTvState.setVisibility(View.VISIBLE);
   }
   if (mItem.isCheckAble()) {
     mCbCheck.setVisibility(View.VISIBLE);
     mCbCheck.setChecked(mItem.isChecked());
   } else {
     mCbCheck.setVisibility(View.GONE);
   }
   mVSep.setVisibility(mItem.isSepAble() ? View.VISIBLE : View.GONE);
   mIvGo.setVisibility(mItem.isRArrAble() ? View.VISIBLE : View.GONE);
   if (mItem.getIconResid() > 0) {
     mIvIcon.setVisibility(View.VISIBLE);
     mIvIcon.setImageResource(mItem.getIconResid());
   } else {
     mIvIcon.setVisibility(View.GONE);
   }
 }
Exemple #2
0
 public String getTag() {
   return StrUtils.isEmpty(mFragTag) ? mFragName : mFragTag;
 }