public override View GetChildView(int groupPosition, int childPosition, bool isLastChild, View convertView, ViewGroup parent)
        {
            View child = inflater.Inflate(Resource.Layout.item_top_rank_child, null);

            TextView tvName = child.FindViewById <TextView>(Resource.Id.tvRankChildName);

            tvName.Text  = (childArray[groupPosition][childPosition].title);
            child.Click += (sender, e) => {
                listener.onItemClick(child, childPosition, childArray[groupPosition][childPosition]);
            };
            return(child);
        }
Esempio n. 2
0
        protected override void OnBindData(RecyclerView.ViewHolder viewHolder, int position, CategoryList.MaleBean item)
        {
            var holder = viewHolder as EasyRVHolder;

            holder.setText(Resource.Id.tvName, item.name)
            .setText(Resource.Id.tvBookCount, Java.Lang.String.Format(mContext.GetString(Resource.String
                                                                                         .category_book_count), item.bookCount));
            holder.Click += (sender, e) => {
                itemClickListener.onItemClick(holder.getItemView(), position, item);
            };
        }
        protected override void OnBindData(RecyclerView.ViewHolder viewHolder, int position, CommentList.CommentsBean item)
        {
            var holder = viewHolder as EasyRVHolder;

            holder.setCircleImageUrl(Resource.Id.ivBookCover, Constant.IMG_BASE_URL + item.author.avatar, Resource.Drawable.avatar_default)
            .setText(Resource.Id.tvBookTitle, item.author.nickname)
            .setText(Resource.Id.tvContent, item.content)
            .setText(Resource.Id.tvBookType, Java.Lang.String.Format(mContext.GetString(Resource.String.book_detail_user_lv), item.author.lv))
            .setText(Resource.Id.tvFloor, Java.Lang.String.Format(mContext.GetString(Resource.String.comment_floor), item.floor))
            .setText(Resource.Id.tvLikeCount, Java.Lang.String.Format(mContext.GetString(Resource.String.comment_like_count), item.likeCount));
            holder.Click += (sender, e) => {
                if (listener != null)
                {
                    listener.onItemClick(viewHolder.ItemView, position, item);
                }
            };
        }
Esempio n. 4
0
        protected override void OnBindData(RecyclerView.ViewHolder viewHolder, int position, HotReview.Reviews item)
        {
            var holder = viewHolder as EasyRVHolder;

            holder.setCircleImageUrl(Resource.Id.ivBookCover, Constant.IMG_BASE_URL + item.author.avatar, Resource.Drawable.avatar_default)
            .setText(Resource.Id.tvBookTitle, item.author.nickname)
            .setText(Resource.Id.tvBookType, Java.Lang.String.Format(mContext.GetString(Resource.String
                                                                                        .book_detail_user_lv), item.author.lv))
            .setText(Resource.Id.tvTitle, item.title)
            .setText(Resource.Id.tvContent, item.content)
            .setText(Resource.Id.tvHelpfulYes, item.helpful.yes.ToString());
            XLHRatingBar ratingBar = holder.getView <XLHRatingBar>(Resource.Id.rating);

            ratingBar.setCountSelected(item.rating);
            holder.Click += (sender, e) =>
            {
                itemClickListener.onItemClick(holder.getItemView(), position, item);
            };
        }
Esempio n. 5
0
        protected override void OnBindData(RecyclerView.ViewHolder viewHolder, int position, RecommendBookList.RecommendBook item)
        {
            EasyRVHolder holder = viewHolder as EasyRVHolder;

            if (!Settings.IsNoneCover)
            {
                holder.setRoundImageUrl(Resource.Id.ivBookListCover, Constant.IMG_BASE_URL + item.cover, Resource.Drawable.cover_default);
            }

            holder.setText(Resource.Id.tvBookListTitle, item.title)
            .setText(Resource.Id.tvBookAuthor, item.author)
            .setText(Resource.Id.tvBookListTitle, item.title)
            .setText(Resource.Id.tvBookListDesc, item.desc)
            .setText(Resource.Id.tvBookCount, Java.Lang.String.Format(mContext.GetString(Resource.String
                                                                                         .book_detail_recommend_book_list_book_count), item.bookCount))
            .setText(Resource.Id.tvCollectorCount, Java.Lang.String.Format(mContext.GetString(Resource.String
                                                                                              .book_detail_recommend_book_list_collector_count), item.collectorCount));
            // TODO: NoDoubleClickListener
            holder.Click += (sender, e) => {
                itemClickListener.onItemClick(holder.getItemView(), position, item);
            };
        }
Esempio n. 6
0
        protected override void OnBindData(RecyclerView.ViewHolder viewHolder, int position, BooksByTag.TagBook item)
        {
            StringBuffer sbTags = new StringBuffer();

            foreach (string tag in item.tags)
            {
                if (!TextUtils.IsEmpty(tag))
                {
                    sbTags.Append(tag);
                    sbTags.Append(" | ");
                }
            }
            var holder = viewHolder as EasyRVHolder;

            holder.setRoundImageUrl(Resource.Id.ivBookCover, Constant.IMG_BASE_URL + item.cover, Resource.Drawable.cover_default)
            .setText(Resource.Id.tvBookListTitle, item.title)
            .setText(Resource.Id.tvShortIntro, item.shortIntro)
            .setText(Resource.Id.tvTags, (item.tags.Count() == 0 ? "" : sbTags.Substring(0, sbTags
                                                                                         .LastIndexOf(" | "))));
            holder.Click += (sender, e) => {
                itemClickListener.onItemClick(holder.getItemView(), position, item);
            };
        }