コード例 #1
0
        // Create new views (invoked by the layout manager)
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            try
            {
                View itemView;

                if (viewType == 1)
                {
                    itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Style_MoreSection2_view, parent, false);
                    var vh = new MoreSectionAdapterViewHolderTheme2(itemView, Click, LongClick);
                    return(vh);
                }
                else
                {
                    itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Style_MoreSection_view, parent, false);
                    var vh = new MoreSectionAdapterViewHolder(itemView, Click, LongClick);
                    return(vh);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
コード例 #2
0
 // Create new views (invoked by the layout manager)
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     try
     {
         //Setup your layout here >> ChannelSubscribed_View
         var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Style_MoreSection_view, parent, false);
         var vh       = new MoreSectionAdapterViewHolder(itemView, OnClick, OnLongClick);
         return(vh);
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
         return(null);
     }
 }
コード例 #3
0
 // Create new views (invoked by the layout manager)
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     try
     {
         //Setup your layout here >> ChannelSubscribed_View
         var itemView = LayoutInflater.From(parent.Context)?.Inflate(Resource.Layout.Style_MoreSection_view, parent, false);
         var vh       = new MoreSectionAdapterViewHolder(itemView, Click, LongClick);
         return(vh);
     }
     catch (Exception exception)
     {
         Methods.DisplayReportResultTrack(exception);
         return(null !);
     }
 }
コード例 #4
0
        // Create new views (invoked by the layout manager)
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            try
            {
                View itemView;

                switch (viewType)
                {
                case 1:
                {
                    itemView = LayoutInflater.From(parent.Context)?.Inflate(Resource.Layout.Style_MoreSection2_view, parent, false);
                    var vh = new MoreSectionAdapterViewHolderTheme2(itemView, Click, LongClick);
                    return(vh);
                }

                case 2:
                {
                    itemView = LayoutInflater.From(parent.Context)?.Inflate(Resource.Layout.Style_MoreSection_view, parent, false);
                    var vh = new MoreSectionAdapterViewHolder(itemView, Click, LongClick);
                    return(vh);
                }

                default:
                {
                    itemView = LayoutInflater.From(parent.Context)?.Inflate(Resource.Layout.Style_MoreSection_view, parent, false);
                    var vh = new MoreSectionAdapterViewHolder(itemView, Click, LongClick);
                    return(vh);
                }
                }
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
                return(null !);
            }
        }