Beispiel #1
0
 public override void convert(EasyLVHolder holder, int position, ReadTheme readTheme)
 {
     if (readTheme != null)
     {
         ThemeManager.setReaderTheme(readTheme.theme, holder.getView <View>(Resource.Id.ivThemeBg));
         if (selected == position)
         {
             holder.setVisible(Resource.Id.ivSelected, true);
         }
         else
         {
             holder.setVisible(Resource.Id.ivSelected, false);
         }
     }
 }
        public override void convert(EasyLVHolder holder, int position, string s)
        {
            holder.setText(Resource.Id.tvMinorItem, s);

            if (current == position)
            {
                holder.setVisible(Resource.Id.ivMinorChecked, true);
            }
            else
            {
                holder.setVisible(Resource.Id.ivMinorChecked, false);
            }

            if (position != 0)
            { // 子项右移
                TextView textView = holder.getView <TextView>(Resource.Id.tvMinorItem);
                RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)textView.LayoutParameters;
                layoutParams.LeftMargin   = ScreenUtils.dpToPxInt(25);
                textView.LayoutParameters = layoutParams;
            }
        }