当前位置: 首页>>代码示例>>C#>>正文


C# RecyclerView.SetScrollContainer方法代码示例

本文整理汇总了C#中RecyclerView.SetScrollContainer方法的典型用法代码示例。如果您正苦于以下问题:C# RecyclerView.SetScrollContainer方法的具体用法?C# RecyclerView.SetScrollContainer怎么用?C# RecyclerView.SetScrollContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RecyclerView的用法示例。


在下文中一共展示了RecyclerView.SetScrollContainer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            _persoon = Gegevens.GetPerson();
            _groep = Gegevens.CurrentGroup();

            SetContentView(Resource.Layout.Betaalscherm);

            _toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
            ImageView Avatar = _toolbar.FindViewById<ImageView>(Resource.Id.Avatar);
            TextView Title = _toolbar.FindViewById<TextView>(Resource.Id.Title);
            Title.Text = _groep.groepsnaam;

            foreach (var lid in _persoon.KrijgSchuldGroep(_groep))
            {
                deelnemers.Add(new ListItem(lid.Key, Resource.Drawable.iconn, lid.Value, _groep));
            }

            _adapter = new ListItemAdapter(ListItem.Session, deelnemers);
            _adapter.ItemClick += OnItemClick;
            _adapter.ItemLongClick += (sender, e) => {};

            _recyclerView = FindViewById<RecyclerView>(Resource.Id.recyclerview);
            _recyclerView.SetMinimumHeight(ConvertDptoPx(listItemHeight*deelnemers.Count));
            _recyclerView.SetLayoutManager(new LinearLayoutManager(this));
            _recyclerView.SetScrollContainer(true);
            _recyclerView.NestedScrollingEnabled = false;
            _recyclerView.SetAdapter(_adapter);

            SetSupportActionBar(_toolbar);
            SupportActionBar.Title = "";
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);
        }
开发者ID:SansSkill,项目名称:Introproject,代码行数:35,代码来源:Betaalscherm.cs

示例2: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Groepscherm);

            _persoon = Gegevens.GetPerson();
            _groep = Gegevens.CurrentGroup();

            _toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);

            TextView title = _toolbar.FindViewById<TextView>(Resource.Id.Title);
            title.Text = _groep.groepsnaam;

            SetSupportActionBar(_toolbar);
            SupportActionBar.Title = "";
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);

            _participantsRecyclerView = FindViewById<RecyclerView>(Resource.Id.participantsrecyclerview);
            _participantsRecyclerView.SetLayoutManager(new LinearLayoutManager(this));
            _participantsRecyclerView.SetScrollContainer(false);
            _participantsRecyclerView.NestedScrollingEnabled = false;

            _swipeRefreshLayout = FindViewById<SwipeRefreshLayout>(Resource.Id.swipe_refresh);
            _swipeRefreshLayout.SetColorSchemeResources(Resource.Color.mainColor);
            _swipeRefreshLayout.SetOnRefreshListener(this);

            CardView historyCardView = FindViewById<CardView>(Resource.Id.history_card_view);
            Button cameraButton = FindViewById<Button>(Resource.Id.buttonCamera);
            Button textButton = FindViewById<Button>(Resource.Id.buttonText);
            Button leaveButton = FindViewById<Button>(Resource.Id.buttonLeave);

            leaveButton.Click += (sender, e) =>
            {
                DatabaseInterface.RemoveFromGroup(_persoon.Id, _groep.groepsnaam, _persoon.Id, _persoon.Password);
                Finish();
            };
            historyCardView.Click += (sender, e) =>
            {
                var activity = new Intent(this, typeof(Historyscherm));
                StartActivity(activity);
            };
            cameraButton.Click += (sender, e) =>
            {
                var activity = new Intent(this, typeof(CameraActivity));
                StartActivityForResult(activity, 1);
            };
            textButton.Click += (sender, e) =>
            {
                var activity = new Intent(this, typeof(Nieuwschuld));
                StartActivity(activity);
            };

            CreateParticipantsEnvironment();
        }
开发者ID:SansSkill,项目名称:Introproject,代码行数:56,代码来源:Groepscherm.cs

示例3: CreateRecyclerView

 private void CreateRecyclerView(RecyclerView rv)
 {
     rv.SetLayoutManager(new LinearLayoutManager(this.Activity));
     rv.SetScrollContainer(false);
     rv.NestedScrollingEnabled = false;
 }
开发者ID:SansSkill,项目名称:Introproject,代码行数:6,代码来源:PayFragments.cs

示例4: CreateParticipantsEnvironment

        private void CreateParticipantsEnvironment()
        {
            _participants = new List<ListItem>();
            _participantsAdapter = new ListItemAdapter(ListItem.SampleContact, _participants);
            _participantsAdapter.ItemClick += (sender, args) =>
            {
                Toast.MakeText(this, "Removed " + ((ListItemAdapter) sender).Items[args.Position].Name, ToastLength.Short).Show();

                ((ListItemAdapter) sender).Items.RemoveAt(args.Position);
                ((ListItemAdapter) sender).NotifyDataSetChanged();

                _participantsRecyclerView.LayoutParameters.Height = ConvertDptoPx(listItemHeight * _participantsAdapter.Items.Count);
            };

            _participantsRecyclerView = FindViewById<RecyclerView>(Resource.Id.participantsrecyclerview);
            _participantsRecyclerView.LayoutParameters.Height = ConvertDptoPx(listItemHeight * _participantsAdapter.Items.Count);
            _participantsRecyclerView.SetLayoutManager(new LinearLayoutManager(this));
            _participantsRecyclerView.SetScrollContainer(false);
            _participantsRecyclerView.NestedScrollingEnabled = false;
            _participantsRecyclerView.SetAdapter(_participantsAdapter);
        }
开发者ID:SansSkill,项目名称:Introproject,代码行数:21,代码来源:AddGroupScherm.cs

示例5: MakeView

        private void MakeView(List<ListItem> _list, int state)
        {
            _adapter = new ListItemAdapter(state, _list);

            _recyclerView = FindViewById<RecyclerView>(Resource.Id.recyclerview);

            _recyclerView.SetMinimumHeight(ConvertDptoPx(listItemHeight*_list.Count));
            _recyclerView.SetLayoutManager(new LinearLayoutManager(this));

            _recyclerView.SetScrollContainer(true);
            _recyclerView.NestedScrollingEnabled = false;
            _recyclerView.SetAdapter(_adapter);

            SetSupportActionBar(_toolbar);
            SupportActionBar.Title = "";
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);
        }
开发者ID:SansSkill,项目名称:Introproject,代码行数:18,代码来源:Nieuwschuld.cs


注:本文中的RecyclerView.SetScrollContainer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。