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


C# ListView.StartAnimation方法代码示例

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


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

示例1: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = (View) inflater.Inflate(Resource.Layout.GuZhangPuTongSouSUoJieGuo,container, false);

            Activity.Window.SetSoftInputMode (SoftInput.AdjustPan);

            mHuoJingLiShiListView = view.FindViewById<ListView> (Resource.Id.HuoJingLiShiChaXunJieGuo_listViewGZJG);
            mHeaderDanWeiMingCheng = view.FindViewById<TextView> (Resource.Id.txtHeaderDanWeiMingChengChaXunGZJG);

            mBtnHuoJingLiShiLastPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiChaXunJieGuoLastPageGZJG);
            mBtnHuoJingLiShiNextPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiChaXunJieGuoNextPageGZJG);
            mTxtHuoJingLiSHiPageToGo = view.FindViewById<EditText> (Resource.Id.txtHuoJingLiShiChaXunJieGuoPageToGoGZJG);
            mbtnHuoJingLiSHiPageToGo = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiChaXunJieGuoPageToGoGZJG);

            mProgressBar = view.FindViewById<ProgressBar> (Resource.Id.progressBar);
            mProgressBar.Visibility = ViewStates.Visible;

            if (logInDialogCreate.mLoginInfo.dwmc.Length > 8) {
                mHeaderDanWeiMingCheng.Text = logInDialogCreate.mLoginInfo.dwmc.Substring (0, 8);
            } else {
                mHeaderDanWeiMingCheng.Text = logInDialogCreate.mLoginInfo.dwmc;
            }

            SouSuoTiaoJian1 = view.FindViewById<TextView> (Resource.Id.ChaXunJieGuoTiaoJian1GZJG);
            SouSuoTiaoJian2 = view.FindViewById<TextView> (Resource.Id.ChaXunJieGuoTiaoJian2GZJG);
            SouSuoTiaoJian3 = view.FindViewById<TextView> (Resource.Id.ChaXunJieGuoTiaoJian3GZJG);
            SouSuoTiaoJian4 = view.FindViewById<TextView> (Resource.Id.ChaXunJieGuoTiaoJian4GZJG);

            switch (GuZhangJiBie) {
            case "3":
                SouSuoTiaoJian1.Text ="故障级别:"+ "普通故障";
                break;
            case "4":
                SouSuoTiaoJian1.Text ="故障级别:"+ "屏蔽信息";
                break;

            }

            if (GuZhangDiZhi != "") {
                SouSuoTiaoJian2.Text = "故障地址:" + GuZhangDiZhi;
            } else {
                SouSuoTiaoJian2.Text = "故障地址:" + "全部";
            }

            if (BeginTime != "") {
                BeginTimeString = BeginTime.Replace ("年", "-").Replace ("月", "-").Replace ("日", "");
                dateBegin = BeginTimeString;
            } else {
                BeginTimeString="全部";
                dateBegin = "";
            }

            if (EndTime != "") {
                EndTimestring = EndTime.Replace ("年", "-").Replace ("月", "-").Replace ("日", "");
                dateEnd = EndTimestring;
            } else {
                EndTimestring="全部";
                dateEnd = "";
            }

            SouSuoTiaoJian3.Text ="开始时间:" + BeginTimeString;
            SouSuoTiaoJian4.Text ="结束时间:" + EndTimestring;

            animationfadeIn = new AlphaAnimation(0.0f, 1.0f);
            animationfadeIn.Duration=500;

            animationfadeout = new AlphaAnimation(1.0f, 0.0f);
            animationfadeout.Duration=500;
            animationfadeout.StartOffset=500;

            mWorker=new BackgroundWorker();
            mWorker.WorkerSupportsCancellation = true;

            mWorker.DoWork+= delegate(object sender1, DoWorkEventArgs e1) {

                BackgroundWorker mworker = sender1 as BackgroundWorker;

                if (mworker.CancellationPending == true) {
                    e1.Cancel = true;
                } else {
                    HttpRequestLiSHi (pageNum);
                }

            };

            mWorker.RunWorkerCompleted+=delegate(object sender1, RunWorkerCompletedEventArgs e1) {

                if (e1.Cancelled == true) {

                } else if (!(e1.Error == null)) {

                } else {

                    //work complete
                    if (internetFlag == 1) {

                        mHuoJingLiShiAdapter = new GuZhangLiShiAdapter(Application.Context, Resource.Layout.HuoJingLiShiXinXI_Row, mHuoJingLiShiChaXunJieGuoList);
                        mHuoJingLiShiListView.Adapter = mHuoJingLiShiAdapter;
                        mHuoJingLiShiListView.StartAnimation (animationfadeIn);

//.........这里部分代码省略.........
开发者ID:coroner4817,项目名称:ShangShuiXiaoFang,代码行数:101,代码来源:GuZhangPuTongSouSuoJieGuoFrag.cs

示例2: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = (View) inflater.Inflate(Resource.Layout.GuZhangLiShi_ListShow,container, false);
            Activity.Window.SetSoftInputMode (SoftInput.AdjustPan);

            SetHasOptionsMenu(true);

            mGuZhangLiShiListView = view.FindViewById<ListView> (Resource.Id.HuoJingLiShi_listViewGZ);
            mHeaderDanWeiMingChengGuZhang = view.FindViewById<TextView> (Resource.Id.txtHeaderDanWeiMingChengGZ);

            mBtnGuZhangLiShiLastPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiLastPageGZ);
            mBtnGuZhangLiShiNextPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiNextPageGZ);
            mTxtGuZhangLiSHiPageToGo = view.FindViewById<EditText> (Resource.Id.txtHuoJingLiShiPageToGoGZ);
            mbtnGuZhangLiSHiPageToGo = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiPageToGoGZ);

            mProgressBar = view.FindViewById<ProgressBar> (Resource.Id.progressBar);
            mProgressBar.Visibility = ViewStates.Visible;

            if (logInDialogCreate.mLoginInfo.dwmc.Length > 8) {
                mHeaderDanWeiMingChengGuZhang.Text = logInDialogCreate.mLoginInfo.dwmc.Substring (0, 8);
            } else {
                mHeaderDanWeiMingChengGuZhang.Text = logInDialogCreate.mLoginInfo.dwmc;
            }

            animationfadeIn = new AlphaAnimation(0.0f, 1.0f);
            animationfadeIn.Duration=500;

            animationfadeout = new AlphaAnimation(1.0f, 0.0f);
            animationfadeout.Duration=500;
            animationfadeout.StartOffset=500;

            mWorker=new BackgroundWorker();
            mWorker.WorkerSupportsCancellation = true;

            mWorker.DoWork+= delegate(object sender1, DoWorkEventArgs e1) {

                BackgroundWorker mworker = sender1 as BackgroundWorker;

                if (mworker.CancellationPending == true) {
                    e1.Cancel = true;
                } else {
                    HttpRequestLiSHi (pageNum);
                }

            };

            mWorker.RunWorkerCompleted+=delegate(object sender1, RunWorkerCompletedEventArgs e1) {

                if (e1.Cancelled == true) {

                } else if (!(e1.Error == null)) {

                } else {

                    //work complete
                    if (internetFlag == 1) {
                        mGuZhangLiShiAdapter = new GuZhangLiShiAdapter (Application.Context, Resource.Layout.HuoJingLiShiXinXI_Row, mGuZhangLiShiList);
                        mGuZhangLiShiListView.Adapter = mGuZhangLiShiAdapter;

                        mGuZhangLiShiListView.StartAnimation (animationfadeIn);

                        if(mGuZhangLiShiAdapter.Count==0)
                        {
                            Toast mToast = Toast.MakeText (Application.Context, "没有历史记录", ToastLength.Short);
                            mToast.Show ();
                        }

                    }
                    else{
                        Toast mToast = Toast.MakeText (Application.Context, "网络异常", ToastLength.Short);
                        mToast.Show ();
                    }
                }

                BackgroundWorker mWorker2 = new BackgroundWorker ();

                mWorker2.DoWork +=delegate {
                    pausefor1Sec();
                };

                mWorker2.RunWorkerCompleted += delegate {

                    mProgressBar.Visibility = ViewStates.Gone;

                };

                mWorker2.RunWorkerAsync();

            };

            if (mWorker.IsBusy != true) {
                mWorker.RunWorkerAsync ();
            }

            mGuZhangLiShiListView.ItemClick += mHuoJingLiShiListView_ItemClick;

            mBtnGuZhangLiShiLastPage.Click+= MBtnHuoJingLiShiLastPage_Click;
            mBtnGuZhangLiShiNextPage.Click += MBtnHuoJingLiShiNextPage_Click;
            mbtnGuZhangLiSHiPageToGo.Click+= MbtnHuoJingLiSHiPageToGo_Click;

//.........这里部分代码省略.........
开发者ID:coroner4817,项目名称:ShangShuiXiaoFang,代码行数:101,代码来源:GuZhangLiShiFrag.cs

示例3: InstantiateItem

        public override Java.Lang.Object InstantiateItem(ViewGroup container, int position)
        {
            int pos = position + 1;

            animationfadeIn = new AlphaAnimation(0.0f, 1.0f);
            animationfadeIn.Duration=500;

            animationfadeout = new AlphaAnimation(1.0f, 0.0f);
            animationfadeout.Duration=500;
            animationfadeout.StartOffset=500;

            if (pos == 1)
            {

                View view1 = LayoutInflater.From(container.Context).Inflate(Resource.Layout.ShuiWeiListShow, container, false);
                container.AddView(view1);

                mActivity.Window.SetSoftInputMode (SoftInput.AdjustPan);

                mShuiWeiHeader = view1.FindViewById<TextView> (Resource.Id.txtHeaderDanWeiMingChengSW);
                mShuiWeiListView = view1.FindViewById<ListView> (Resource.Id.HuoJingLiShi_listViewSW);
                mShuiWeiNextPage = view1.FindViewById<Button> (Resource.Id.btnHuoJingLiShiNextPageSW);
                mShuiWeiLastPage = view1.FindViewById<Button> (Resource.Id.btnHuoJingLiShiLastPageSW);
                mShuiWeiEditText = view1.FindViewById<EditText> (Resource.Id.txtHuoJingLiShiPageToGoSW);
                mShuiWeiPageToGo = view1.FindViewById<Button> (Resource.Id.btnHuoJingLiShiPageToGoSW);

                mProgressBar = view1.FindViewById<ProgressBar> (Resource.Id.progressBar);
                mProgressBar.Visibility = ViewStates.Visible;

                if (logInDialogCreate.mLoginInfo.dwmc.Length > 8) {
                    mShuiWeiHeader.Text = logInDialogCreate.mLoginInfo.dwmc.Substring (0, 8);
                } else {
                    mShuiWeiHeader.Text = logInDialogCreate.mLoginInfo.dwmc;
                }

                mWorker=new BackgroundWorker();
                mWorker.WorkerSupportsCancellation = true;

                mWorker.DoWork+= delegate(object sender1, DoWorkEventArgs e1) {

                    BackgroundWorker mworker = sender1 as BackgroundWorker;

                    if (mworker.CancellationPending == true) {
                        e1.Cancel = true;
                    } else {

                        //dowork
                        HttpRequestShuiWei (pageNum);
                    }

                };

                mWorker.RunWorkerCompleted+=delegate(object sender1, RunWorkerCompletedEventArgs e1) {

                    if (e1.Cancelled == true) {

                    } else if (!(e1.Error == null)) {

                    } else {

                        //work complete
                        if (internetFlag == 1) {
                            mShuiWeiListView.StartAnimation (animationfadeout);
                            mGuZhangLiShiAdapter = new ShuiWeiShuiYaListAdapter (Application.Context, Resource.Layout.HuoJingLiShiXinXI_Row, ShuiWeiList);
                            mShuiWeiListView.Adapter = mGuZhangLiShiAdapter;
                            mShuiWeiListView.StartAnimation (animationfadeIn);

                        }
                        else{
                            Toast mToast = Toast.MakeText (Application.Context, "网络异常", ToastLength.Short);
                            mToast.Show ();
                        }
                    }

                    BackgroundWorker mWorker2 = new BackgroundWorker ();

                    mWorker2.DoWork +=delegate {
                        pausefor1Sec();
                    };

                    mWorker2.RunWorkerCompleted += delegate {

                        mProgressBar.Visibility = ViewStates.Gone;

                    };

                    mWorker2.RunWorkerAsync();

                };

                if (mWorker.IsBusy != true) {
                    mWorker.RunWorkerAsync ();
                }

                mShuiWeiListView.ItemClick += mShuiWeiListView_ItemClick;

                mShuiWeiLastPage.Click+= mShuiWeiLastPage_Click;
                mShuiWeiNextPage.Click += mShuiWeiNextPage_Click;
                mShuiWeiPageToGo.Click+= mShuiWeiPageToGo_Click;

//.........这里部分代码省略.........
开发者ID:coroner4817,项目名称:ShangShuiXiaoFang,代码行数:101,代码来源:ShuiWeiShuiYaListViewTabAdapter.cs

示例4: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = (View) inflater.Inflate(Resource.Layout.ShiPinChaGnagJieGuo,container, false);

            Activity.Window.SetSoftInputMode (SoftInput.AdjustPan);

            //SetHasOptionsMenu(true);

            mHuoJingLiShiListView = view.FindViewById<ListView> (Resource.Id.HuoJingLiShi_listViewSP);
            mHeaderDanWeiMingCheng = view.FindViewById<TextView> (Resource.Id.txtHeaderDanWeiMingChengSP);

            mBtnHuoJingLiShiLastPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiLastPageSP);
            mBtnHuoJingLiShiNextPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiNextPageSP);
            mTxtHuoJingLiSHiPageToGo = view.FindViewById<EditText> (Resource.Id.txtHuoJingLiShiPageToGoSP);
            mbtnHuoJingLiSHiPageToGo = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiPageToGoSP);

            TiaoJian1 = view.FindViewById<TextView> (Resource.Id.ShiPinJieGuoTiaoJian1);
            TiaoJian2 = view.FindViewById<TextView> (Resource.Id.ShiPinJieGuoTiaoJian2);
            TiaoJian3 = view.FindViewById<TextView> (Resource.Id.ShiPinJieGuoTiaoJian3);
            TiaoJian4 = view.FindViewById<TextView> (Resource.Id.ShiPinJieGuoTiaoJian4);

            if (logInDialogCreate.mLoginInfo.dwmc.Length > 8) {
                mHeaderDanWeiMingCheng.Text = logInDialogCreate.mLoginInfo.dwmc.Substring (0, 8);
            } else {
                mHeaderDanWeiMingCheng.Text = logInDialogCreate.mLoginInfo.dwmc;
            }

            mProgressBar = view.FindViewById<ProgressBar> (Resource.Id.progressBar);
            mProgressBar.Visibility = ViewStates.Visible;

            switch (chaGangZhuangTai)
            {
            case "0":
                TiaoJian1.Text="查岗状态 :"+"等待";
                break;
            case "1":
                TiaoJian1.Text="查岗状态 :"+"在岗";
                break;
            case "2":
                TiaoJian1.Text="查岗状态 :"+"缺岗";
                break;
            case "3":
                TiaoJian1.Text="查岗状态 :"+"断线";
                break;
            }

            if (beginDate != "") {
                BeginTimeString = beginDate.Replace ("年", "-").Replace ("月", "-").Replace ("日", "");
                dateBegin = BeginTimeString;
            } else {
                BeginTimeString="全部";
                dateBegin = "";
            }

            if (endDate != "") {
                EndTimestring = endDate.Replace ("年", "-").Replace ("月", "-").Replace ("日", "");
                dateEnd = EndTimestring;
            } else {
                EndTimestring="全部";
                dateEnd = "";
            }

            TiaoJian3.Text ="开始时间:" + BeginTimeString;
            TiaoJian4.Text ="结束时间:" + EndTimestring;

            animationfadeIn = new AlphaAnimation(0.0f, 1.0f);
            animationfadeIn.Duration=500;

            animationfadeout = new AlphaAnimation(1.0f, 0.0f);
            animationfadeout.Duration=500;
            animationfadeout.StartOffset=500;

            mWorker=new BackgroundWorker();
            mWorker.WorkerSupportsCancellation = true;

            mWorker.DoWork+= delegate(object sender1, DoWorkEventArgs e1) {

                BackgroundWorker mworker = sender1 as BackgroundWorker;

                if (mworker.CancellationPending == true) {
                    e1.Cancel = true;
                } else {

                    HttpRequestLiSHi (pageNum);

                }

            };

            mWorker.RunWorkerCompleted+=delegate(object sender1, RunWorkerCompletedEventArgs e1) {

                if (e1.Cancelled == true) {

                } else if (!(e1.Error == null)) {

                } else {

                    if (internetFlag == 1) {
                        mHuoJingLiShiListView.StartAnimation (animationfadeout);
                        mHuoJingLiShiAdapter = new ShiPinLiShiAdapter (Application.Context, Resource.Layout.HuoJingLiShiXinXI_Row, mHuoJingLiShiList);
//.........这里部分代码省略.........
开发者ID:coroner4817,项目名称:ShangShuiXiaoFang,代码行数:101,代码来源:ShiPinChaGangSouSuoJieGuo.cs

示例5: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = (View) inflater.Inflate(Resource.Layout.ShiPinChaGangListShow,container, false);

            Activity.Window.SetSoftInputMode (SoftInput.AdjustPan);

            //SetHasOptionsMenu(true);

            mHuoJingLiShiListView = view.FindViewById<ListView> (Resource.Id.HuoJingLiShi_listViewSP);
            mHeaderDanWeiMingCheng = view.FindViewById<TextView> (Resource.Id.txtHeaderDanWeiMingChengSP);

            mBtnHuoJingLiShiLastPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiLastPageSP);
            mBtnHuoJingLiShiNextPage = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiNextPageSP);
            mTxtHuoJingLiSHiPageToGo = view.FindViewById<EditText> (Resource.Id.txtHuoJingLiShiPageToGoSP);
            mbtnHuoJingLiSHiPageToGo = view.FindViewById<Button> (Resource.Id.btnHuoJingLiShiPageToGoSP);

            mImageButton1 = view.FindViewById<LinearLayout> (Resource.Id.imageButton1);
            mImageButton2 = view.FindViewById<LinearLayout> (Resource.Id.imageButton2);
            mImageButton3 = view.FindViewById<LinearLayout> (Resource.Id.imageButton3);

            if (logInDialogCreate.mLoginInfo.dwmc.Length > 8) {
                mHeaderDanWeiMingCheng.Text = logInDialogCreate.mLoginInfo.dwmc.Substring (0, 8);
            } else {
                mHeaderDanWeiMingCheng.Text = logInDialogCreate.mLoginInfo.dwmc;
            }

            mProgressBar = view.FindViewById<ProgressBar> (Resource.Id.progressBar);
            mProgressBar.Visibility = ViewStates.Visible;

            mImageButton1.Click += delegate {

                mProgressBar.Visibility = ViewStates.Visible;

                mWorkerChaGang=new BackgroundWorker();
                mWorkerChaGang.WorkerSupportsCancellation = true;

                mWorkerChaGang.DoWork+= delegate(object sender1, DoWorkEventArgs e1) {

                    BackgroundWorker mworker = sender1 as BackgroundWorker;

                    if (mworker.CancellationPending == true) {
                        e1.Cancel = true;
                    } else {

                        string strURLSend = this.Resources.GetString (Resource.String.HttpUri) + String.Format ("onguard_addexe_unit_android.jsp?dwbh={0}", logInDialogCreate.mLoginInfo.dwbh);
                        Console.WriteLine (strURLSend);

                        mHttpRequestHuoJingLiShi.HttpRequestFunc (strURLSend);

                        if ((mHttpRequestHuoJingLiShi.HttpRecv == "666") || (mHttpRequestHuoJingLiShi.HttpRecv == "555")) {
                            //有问题
                            internetFlag=0;

                        } else
                        {
                            internetFlag=1;
                        }

                    }

                };

                mWorkerChaGang.RunWorkerCompleted+=delegate(object sender1, RunWorkerCompletedEventArgs e1) {

                    if (e1.Cancelled == true) {

                    } else if (!(e1.Error == null)) {

                    } else {

                        if(internetFlag==1)
                        {
                            Toast mToast = Toast.MakeText (Application.Context, "发送查岗信号成功", ToastLength.Short);
                            mToast.Show ();

                        }
                        else
                        {
                            Toast mToast = Toast.MakeText (Application.Context, "网络异常", ToastLength.Short);
                            mToast.Show ();
                        }

                    }

                    BackgroundWorker mWorker2 = new BackgroundWorker ();

                    mWorker2.DoWork +=delegate {
                        pageNum=1;

                        HttpRequestLiSHi (pageNum);
                    };

                    mWorker2.RunWorkerCompleted += delegate {

                        if (internetFlag == 1) {
                            mHuoJingLiShiListView.StartAnimation (animationfadeout);
                            mHuoJingLiShiAdapter = new ShiPinLiShiAdapter (Application.Context, Resource.Layout.HuoJingLiShiXinXI_Row, mHuoJingLiShiList);
                            mHuoJingLiShiListView.Adapter = mHuoJingLiShiAdapter;
                            mHuoJingLiShiListView.StartAnimation (animationfadeIn);
                            internetFlag=0;
//.........这里部分代码省略.........
开发者ID:coroner4817,项目名称:ShangShuiXiaoFang,代码行数:101,代码来源:ShiPinChaGangFrag.cs


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