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();
        }
Beispiel #2
0
        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();
        }
		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 ();
		}
		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 ();

		}