public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            switch ((ViewType)viewType)
            {
            case ViewType.Loader:
                var loaderView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.loading_item, parent, false);
                var loaderVh   = new LoaderViewHolder(loaderView);
                return(loaderVh);

            default:
                var cellView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_recipients_item, parent, false);
                var cellVh   = new RecipientViewHolder(cellView, RecipientSelected);
                return(cellVh);
            }
        }
Example #2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            switch ((ViewType)viewType)
            {
            case ViewType.Loader:
                var loaderView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.loading_item, parent, false);
                var loaderVh   = new LoaderViewHolder(loaderView);
                return(loaderVh);

            default:
                var view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_grid_item, parent, false);
                view.LayoutParameters = new ViewGroup.LayoutParams(CellSize, CellSize);
                return(new ImageViewHolder(view, Click));
            }
        }
Example #3
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            switch ((ViewType)viewType)
            {
            case ViewType.Loader:
                var loaderView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.loading_item, parent, false);
                var loaderVh   = new LoaderViewHolder(loaderView);
                return(loaderVh);

            default:
                var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_feed_item, parent, false);
                var vh       = new FeedViewHolder(itemView, PostAction, TagAction, parent.Context.Resources.DisplayMetrics.WidthPixels);
                return(vh);
            }
        }
Example #4
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            switch ((ViewType)viewType)
            {
            case ViewType.Loader:
                var loaderView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.loading_item, parent, false);
                var loaderVh   = new LoaderViewHolder(loaderView);
                return(loaderVh);

            default:
                var cellView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_followers_item, parent, false);
                var cellVh   = new FollowersViewHolder(cellView, FollowAction, UserAction, _context);
                return(cellVh);
            }
        }
Example #5
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            switch ((ViewType)viewType)
            {
            case ViewType.Loader:
                var loaderView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.loading_item, parent, false);
                var loaderVh   = new LoaderViewHolder(loaderView);
                return(loaderVh);

            default:
                var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_feed_item, parent, false);
                var vh       = new FeedViewHolder(itemView, PostAction, AutoLinkAction, Style.ScreenWidth, Style.ScreenWidth);
                return(vh);
            }
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            switch ((ViewType)viewType)
            {
            case ViewType.Header:
                var headerView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_profile_header, parent, false);
                var headerVh   = new HeaderViewHolder(headerView, Context, FollowersAction, FollowingAction, BalanceAction, FollowAction);
                return(headerVh);

            case ViewType.Loader:
                var loaderView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.loading_item, parent, false);
                var loaderVh   = new LoaderViewHolder(loaderView);
                return(loaderVh);

            default:
                var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.lyt_feed_item, parent, false);
                var vh       = new FeedViewHolder(itemView, LikeAction, UserAction, CommentAction, PhotoClick, VotersClick, FlagAction, HideAction, DeleteAction, TagAction, parent.Context.Resources.DisplayMetrics.WidthPixels);
                return(vh);
            }
        }