本文整理汇总了C#中ListView.SetOnScrollListener方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.SetOnScrollListener方法的具体用法?C# ListView.SetOnScrollListener怎么用?C# ListView.SetOnScrollListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListView
的用法示例。
在下文中一共展示了ListView.SetOnScrollListener方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitView
private void InitView()
{
//设置标题栏
var img_header_back = FindViewById<ImageView> (Resource.Id.img_header_back);
img_header_back.Click += (sender, e) =>
{
SetResult(Result.Canceled);
this.Finish();
OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
};
var tv_back = FindViewById<TextView> (Resource.Id.tv_back);
tv_back.Text = "返回";
var tv_desc = FindViewById<TextView> (Resource.Id.tv_desc);
tv_desc.Text = "选择银行卡";
lv_bankType = FindViewById<ListView> (Resource.Id.lv_bankType);
bankCardInfoListAdapter = new BankCardInfoListAdapter (this);
lv_bankType.Adapter = bankCardInfoListAdapter;
//设置滑动listview停止加载图片
lv_bankType.SetOnScrollListener (new PauseOnScrollListener(Global.imageLoader,false,false));
lv_bankType.SetSelector (Resource.Color.red);//设置被选中项颜色为红
LoadTypeData ();
//点击列表详细
lv_bankType.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) =>
{
var intent = new Intent();
intent.PutExtra("choosebankTypeId",bankCardInfoListAdapter.GetItem(e.Position).BankCardTypeId);
intent.PutExtra("choosebankImgUrl",bankCardInfoListAdapter.GetItem(e.Position).BankCardImageUrl);
SetResult(Result.Ok,intent);
this.Finish();
};
}
示例2: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = inflater.Inflate(Resource.Layout.ListViewWithSwipe, container, false);
SwipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.swipe_refresh_layout);
SwipeRefreshLayout.SetColorSchemeColors(Resource.Color.tenBlue,
Resource.Color.colorPrimary,
Resource.Color.colorAccent,
Resource.Color.colorPrimaryDark);
SwipeRefreshLayout.Refresh += async delegate
{
await FetchTableData();
};
ListView = view.FindViewById<ListView>(Resource.Id.list);
ListView.SetOnScrollListener(new TailFetchListViewListener(this));
ListView.AddFooterView(FooterView, null, false);
ListView.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) =>
{
TenServiceHelper.GoToGuestProfile(FragmentManager, Master.Id, TableItems[e.Position]);
};
BackgroundTextView = (TextView)view.FindViewById<TextView>(Resource.Id.backgroundTextView);
BackgroundTextView.Text = EmptyTableString;
return view;
}
示例3: InitView
private void InitView()
{
//设置标题栏
var btn_header_back = FindViewById<Button> (Resource.Id.btn_header_back);
btn_header_back.Click += (sender, e) =>
{
this.Finish();
};
FindViewById<TextView> (Resource.Id.tv_header_title).Text = "监护人申请处理";
guardianApplyRefreshListView = FindViewById<PullToRefreshListView> (Resource.Id.lv_guardianApply);
actualListView = (ListView)guardianApplyRefreshListView.RefreshableView;
//设置可以上拉加载。下拉刷新
guardianApplyRefreshListView.Mode = PullToRefreshBase.PullToRefreshMode.PullFromStart;
//下拉刷新提示文本
guardianApplyRefreshListView.GetLoadingLayoutProxy(true,false).SetPullLabel(GetString(Resource.String.pullDownLbl));
guardianApplyRefreshListView.GetLoadingLayoutProxy (true,false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl));
guardianApplyRefreshListView.GetLoadingLayoutProxy (true, false).SetReleaseLabel (GetString(Resource.String.pullDownReleaseLbl));
guardianApplyRefreshListView.SetOnRefreshListener (this);
//设置adapter
getApplyInfoAdapter = new GetApplyInfoListAadapter (this);
actualListView.Adapter = getApplyInfoAdapter;
//设置滑动listview停止加载图片
actualListView.SetOnScrollListener (new PauseOnScrollListener(Global.imageLoader,false,false));
getApplyInfoParam = new GetApplyInfoParam (){ Id = Global.MyInfo.UId };
//初始化view完成
IsPrepared = true;
LasyloadData ();
}
示例4: OnCreate
protected async override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.dashboard);
_lvlist = FindViewById<ListView>(Resource.Id.lvList);
_tvCount = FindViewById<TextView>(Resource.Id.tvCount);
_refresher = FindViewById<SwipeRefreshLayout>(Resource.Id.refresher);
_tvNew = FindViewById<TextView>(Resource.Id.tvNew);
_tvHot = FindViewById<TextView>(Resource.Id.tvHot);
_ivNewSipp = FindViewById<ImageView>(Resource.Id.ivsendsipper);
_customAdapter = new SippsAdapter(this);
_lvlist.Adapter = _customAdapter;
_tvNew.Click += TvNew_Click;
_tvHot.Click += TvHot_Click;
_ivNewSipp.Click += ivsendsipper_Click;
_lvlist.ItemClick += Lvlist_ItemClick;
_lvlist.SetOnScrollListener(this);
_refresher.Refresh += async delegate
{
await LoadSipps(true);
_refresher.Refreshing = false;
};
await LoadSipps();
}
示例5: BindHotelView
public void BindHotelView(Context context, ListView view)
{
var data = GetAllHotel();
var myList = data.Skip(10).ToList();
var adapter = new CustomAdapter(myList, Resource.Layout.my_listItem, this);
view.Adapter = adapter;
view.SetOnScrollListener(new CustomScrollLister(adapter, view));
}
示例6: OnCreate
protected override void OnCreate (Android.OS.Bundle bundle)
{
base.OnCreate (bundle);
_listView = FindViewById <ListView> (Resource.Id.teams);
var touchListener = new SwipeDismissListViewTouchListener (_listView,
(ViewModel as TeamsViewModel).RemoveTeamCommand);
_listView.SetOnTouchListener (touchListener);
_listView.SetOnScrollListener (touchListener);
var bindingSet = this.CreateBindingSet<TeamsView, TeamsViewModel> ();
bindingSet.Bind (this).For (view => view.UndoBarData).To (vm => vm.UndoBarMetaData);
bindingSet.Apply ();
}
示例7: InitView
private void InitView()
{
//设置标题栏
var img_header_back = FindViewById<ImageView> (Resource.Id.img_header_back);
img_header_back.Click += (sender, e) =>
{
this.Finish();
OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
};
var tv_back = FindViewById<TextView> (Resource.Id.tv_back);
tv_back.Text = "管理员";
var tv_desc = FindViewById<TextView> (Resource.Id.tv_desc);
tv_desc.Text = "绑定申请";
guardianApplyRefreshListView = FindViewById<PullToRefreshListView> (Resource.Id.lv_guardianApply);
actualListView = (ListView)guardianApplyRefreshListView.RefreshableView;
//设置可以上拉加载。下拉刷新
guardianApplyRefreshListView.Mode = PullToRefreshBase.PullToRefreshMode.PullFromStart;
//下拉刷新提示文本
guardianApplyRefreshListView.GetLoadingLayoutProxy(true,false).SetPullLabel(GetString(Resource.String.pullDownLbl));
guardianApplyRefreshListView.GetLoadingLayoutProxy (true,false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl));
guardianApplyRefreshListView.GetLoadingLayoutProxy (true, false).SetReleaseLabel (GetString(Resource.String.pullDownReleaseLbl));
guardianApplyRefreshListView.SetOnRefreshListener (this);
//设置adapter
getApplyInfoAdapter = new GetApplyInfoListAadapter (this);
actualListView.Adapter = getApplyInfoAdapter;
//设置滑动listview停止加载图片
actualListView.SetOnScrollListener (new PauseOnScrollListener(Global.imageLoader,false,false));
getApplyInfoParam = new GetApplyInfoParam (){ Id = Global.Guid };
//初始化view完成
IsPrepared = true;
LasyloadData ();
}
示例8: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = inflater.Inflate(Resource.Layout.ListViewWithSwipe, container, false);
SwipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.swipe_refresh_layout);
SwipeRefreshLayout.SetColorScheme(Resource.Color.tenBlue,
Resource.Color.colorPrimary,
Resource.Color.colorAccent,
Resource.Color.colorPrimaryDark);
SwipeRefreshLayout.Refresh += async delegate
{
await FetchTableData();
};
ListView = view.FindViewById<ListView>(Resource.Id.list);
ListView.SetOnScrollListener(new TailFetchListViewListener(this));
BackgroundTextView = (TextView)view.FindViewById<TextView>(Resource.Id.backgroundTextView);
BackgroundTextView.Text = EmptyTableString;
return view;
}
示例9: InitView
private void InitView()
{
//设置标题栏
var btn_header_back = FindViewById<Button> (Resource.Id.btn_header_back);
btn_header_back.Click += (sender, e) =>
{
this.Finish();
};
FindViewById<TextView> (Resource.Id.tv_header_title).Text = "监护人绑定";
listView = FindViewById<ListView> (Resource.Id.lv_searchGuardian);
searchView = FindViewById<SearchView> (Resource.Id.searchView);
searchView.SetOnQueryTextListener (this);
//设置searchview中textview颜色
var id = searchView.Context.Resources.GetIdentifier ("android:id/search_src_text", null, null);
textView = (TextView)searchView.FindViewById(id);
textView.SetTextColor (Resources.GetColor (Resource.Color.lightgray));
//查询
var txt_Querry = FindViewById<TextView> (Resource.Id.txt_Querry);
txt_Querry.Click += (sender, e) =>
{
OnQueryTextSubmit(textView.Text);
};
applyGuardianListAdapter = new ApplyGuardianListAdapter (this);
applyGuardianListAdapter.RefreshAction = () => {
QuerryBindGuardian(textView.Text);
};
listView.Adapter = applyGuardianListAdapter;
//设置滑动listview停止加载图片
listView.SetOnScrollListener (new PauseOnScrollListener(Global.imageLoader,false,false));
}
示例10: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
LayoutInflater.Factory = new TextFactoryManager();
SetContentView (Resource.Layout.user_dashboard_list_result);
pastBookingActivity = this;
userDashBoardListView = FindViewById<ListView> (Resource.Id.user_dashboard_list_result);
userDashBoardListView.ItemClick += OnListItemClick;
userDashBoardListView.SetOnScrollListener (this);
llProgressBar = FindViewById<LinearLayout> (Resource.Id.llProgressBar);
llProgressBar.Visibility = ViewStates.Gone;
var llButtonSegmented = FindViewById<LinearLayout> (Resource.Id.llButtonSegmented);
var vLine = FindViewById<View> (Resource.Id.viewSegmented);
var btnAll = FindViewById<Button> (Resource.Id.btnAll);
var btnCompleted = FindViewById<Button> (Resource.Id.btnComplete);
llButtonSegmented.Visibility = ViewStates.Visible;
vLine.Visibility = ViewStates.Visible;
btnAll.FocusableInTouchMode = true;
isBtnAllSelected = true;
btnAll.Click += (sender, e) => {
if(btnAll.FocusableInTouchMode)
return;
isBtnAllSelected = true;
btnAll.FocusableInTouchMode = true;
btnAll.RequestFocus();
btnAll.RequestFocusFromTouch();
btnAll.SetTextColor(Resources.GetColor(Resource.Color.white));
btnCompleted.FocusableInTouchMode = false;
btnCompleted.SetTextColor(Resources.GetColor(Resource.Color.green_sky_landing));
setDataOnSegmentButton();
userDashBoardListView.SetSelection(iCurrentPosAll);
};
btnCompleted.Click += (sender, e) => {
if(btnCompleted.FocusableInTouchMode)
return;
isBtnAllSelected = false;
btnAll.FocusableInTouchMode = false;
btnAll.SetTextColor(Resources.GetColor(Resource.Color.green_sky_landing));
btnCompleted.RequestFocus();
btnCompleted.RequestFocusFromTouch();
btnCompleted.FocusableInTouchMode = true;
btnCompleted.SetTextColor(Resources.GetColor(Resource.Color.white));
setDataOnSegmentButton();
userDashBoardListView.SetSelection(iCurrentPosCompleted);
};
setDataToListView ();
TCNotificationCenter.defaultCenter.addObserver (this, constants.kDeleteFilePast, new TCSelector(onDeleteImagePast));
TCNotificationCenter.defaultCenter.addObserver (this, constants.kNotifyUpdateBookingInfo, new TCSelector(onNotifyUpdateBookingInfo));
TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostDeleteFileSuccess, new TCSelector (onDeleteImagePast));
}
示例11: OnActivityCreated
public override void OnActivityCreated (Bundle savedInstanceState)
{
base.OnActivityCreated (savedInstanceState);
myGuardianRefreshListView = View.FindViewById<PullToRefreshListView> (Resource.Id.lv_myGuardian);
actualListView = (ListView)myGuardianRefreshListView.RefreshableView;
//设置可以上拉加载。下拉刷新
myGuardianRefreshListView.Mode = PullToRefreshBase.PullToRefreshMode.Both;
//下拉刷新提示文本
myGuardianRefreshListView.GetLoadingLayoutProxy(true,false).SetPullLabel(GetString(Resource.String.pullDownLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (true,false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (true, false).SetReleaseLabel (GetString(Resource.String.pullDownReleaseLbl));
//上拉加载提示文本
myGuardianRefreshListView.GetLoadingLayoutProxy(false,true).SetPullLabel(GetString(Resource.String.pullUpLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (false, true).SetRefreshingLabel (GetString(Resource.String.pullUpRefreshLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (false, true).SetReleaseLabel (GetString(Resource.String.pullUpReleaseLbl));
//设置声音
// SoundPullEventListener soundListener = new SoundPullEventListener(Activity);
// soundListener.AddSoundEvent (PullToRefreshBase.PullToRefreshState.PullToRefresh, Resource.Raw.pull_event);
// soundListener.AddSoundEvent (PullToRefreshBase.PullToRefreshState.Reset, Resource.Raw.reset_sound);
// soundListener.AddSoundEvent (PullToRefreshBase.PullToRefreshState.Refreshing, Resource.Raw.refreshing_sound);
// myGuardianRefreshListView.SetOnPullEventListener (soundListener);
//设置上拉下拉监听事件
myGuardianRefreshListView.SetOnRefreshListener (this);
//myGuardianRefreshListView.SetOnLastItemVisibleListener (this);
actualListView.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) =>
{
// Toast.MakeText(Activity,guardianInfoAdapter.GetItem(e.Position-1).Content,ToastLength.Short).Show();
};
//设置滑动listview停止加载图片
actualListView.SetOnScrollListener (new PauseOnScrollListener(Global.imageLoader,false,false));
guardianInfoAdapter = new GuardianInfoAdapter (Activity);
actualListView.Adapter = guardianInfoAdapter;
//初始化请求参数对象
myGuardianInfoListParam = new MineGuardianInfoListParam (){ UserId = Global.MyInfo.UId };
IsPrepared = true;
LasyloadData ();
}
示例12: InitView
private void InitView()
{
//设置标题栏
var img_header_back = FindViewById<ImageView> (Resource.Id.img_header_back);
img_header_back.Click += (sender, e) =>
{
this.Finish();
OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
};
var tv_back = FindViewById<TextView> (Resource.Id.tv_back);
tv_back.Text = "管理员";
var tv_desc = FindViewById<TextView> (Resource.Id.tv_desc);
tv_desc.Text = "绑定会员";
myGuardianRefreshListView = FindViewById<PullToRefreshListView> (Resource.Id.lv_myGuardian);
actualListView = (ListView)myGuardianRefreshListView.RefreshableView;
//设置可以上拉加载。下拉刷新
myGuardianRefreshListView.Mode = PullToRefreshBase.PullToRefreshMode.Both;
//下拉刷新提示文本
myGuardianRefreshListView.GetLoadingLayoutProxy(true,false).SetPullLabel(GetString(Resource.String.pullDownLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (true,false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (true, false).SetReleaseLabel (GetString(Resource.String.pullDownReleaseLbl));
//上拉加载提示文本
myGuardianRefreshListView.GetLoadingLayoutProxy(false,true).SetPullLabel(GetString(Resource.String.pullUpLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (false, true).SetRefreshingLabel (GetString(Resource.String.pullUpRefreshLbl));
myGuardianRefreshListView.GetLoadingLayoutProxy (false, true).SetReleaseLabel (GetString(Resource.String.pullUpReleaseLbl));
//设置上拉下拉监听事件
myGuardianRefreshListView.SetOnRefreshListener (this);
//设置滑动listview停止加载图片
actualListView.SetOnScrollListener (new PauseOnScrollListener(Global.imageLoader,false,false));
guardianInfoAdapter = new GuardianInfoAdapter (this);
actualListView.Adapter = guardianInfoAdapter;
//初始化请求参数对象
myGuardianInfoListParam = new MineGuardianInfoListParam (){ UserId = Global.Guid};
LasyloadData ();
}
示例13: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.search_layout);
searchActivity = this;
if (!MApplication.getInstance ().isLogedIn) {
ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
ActionBar.SetTitle (Resource.String.search_result_title);
ActionBar.SetDisplayShowTitleEnabled (false);
ActionBar.SetDisplayHomeAsUpEnabled (true);
ActionBar.SetDisplayShowHomeEnabled (true);
} else {
searchActivity.menu = ((UserDashBoardMain)searchActivity.Parent).menu;
if (searchActivity.menu != null) {
searchActivity.menu.GetItem (0).SetEnabled (false);
searchActivity.menu.GetItem (0).SetVisible(false);
}
}
setHeadingTitle (Resource.String.search_title);
tvSearchResult = FindViewById<TextView> (Resource.Id.tv_noresult_search);
tvSearchLimit = FindViewById<TextView> (Resource.Id.tv_notice_limit_search);
llProgress = FindViewById<LinearLayout> (Resource.Id.llProgressBar);
specListView = FindViewById<ListView> (Resource.Id.search_list_result);
searchView = FindViewById<SearchView> (Resource.Id.searchView);
sortPopup = new SortPopup (this);
sortPopup.sortDelegate = this;
strKeyWordSeach = "";
resetData();
llProgress.Visibility = ViewStates.Visible;
specListView.ItemClick += OnListItemClick;
specListView.SetOnScrollListener(searchActivity);
inputManager = (InputMethodManager)this.GetSystemService (Context.InputMethodService);
searchView.SetOnQueryTextListener (this);
strSortType = Constants.SortBy.ProximityASC.ToString ();
tvSearchResult.Visibility = ViewStates.Gone;
if (this.Intent.Extras != null) {
if (this.Intent.Extras.ContainsKey (constants.pKeyWordSearch) && constants.isSearchHome) {
searchView.SetIconifiedByDefault (false);
strKeyWordSeach = this.Intent.Extras.GetString (constants.pKeyWordSearch);
searchView.SetQuery (strKeyWordSeach.Trim(), false);
if (strKeyWordSeach.Trim ().Equals ("")) {
tvSearchResult.Visibility = ViewStates.Visible;
llProgress.Visibility = ViewStates.Gone;
} else {
getSpecialistProfilesRequest ();
}
constants.isSearchHome = false;
}
} else {
searchView.SetIconifiedByDefault (false);
searchView.RequestFocus ();
llProgress.Visibility = ViewStates.Gone;
}
footerView = ((LayoutInflater)this.GetSystemService (Context.LayoutInflaterService)).Inflate (Resource.Layout.footer_loading_more, null, false);
TCNotificationCenter.defaultCenter.addObserver (this, constants.kAddFavoriteSuccess, new TCSelector(updateSpecialistInfo));
TCNotificationCenter.defaultCenter.addObserver (this, constants.kRemoveFavoriteSuccess, new TCSelector (updateSpecialistInfo));
}