本文整理汇总了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);
}
示例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();
}
示例3: CreateRecyclerView
private void CreateRecyclerView(RecyclerView rv)
{
rv.SetLayoutManager(new LinearLayoutManager(this.Activity));
rv.SetScrollContainer(false);
rv.NestedScrollingEnabled = false;
}
示例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);
}
示例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);
}