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


C# LinearLayout.StartAnimation方法代码示例

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


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

示例1: InstantiateItem

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

            if (pos == 1)
            {

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

                mRiPicker = view1.FindViewById<Button> (Resource.Id.RiBaoBiaoRiQi);
                mRiChaXun = view1.FindViewById<Button> (Resource.Id.RiBaoBiaoChaXun);

                m11 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo1);
                m21 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo2);
                m31 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo3);
                m41 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo4);
                m51 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo5);
                m61 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo6);
                m71 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo7);
                m81 = view1.FindViewById<TextView> (Resource.Id.BaoBiaoJieGuo8);
                mLayout1 = view1.FindViewById<LinearLayout> (Resource.Id.myJieGuoLayoutRi);
                mLayout1.Visibility = ViewStates.Invisible;

                mProgressBarRi = view1.FindViewById<ProgressBar> (Resource.Id.progressBarRi);

                //mRiChaXun.SetOnClickListener (mBtnListener);

                mRiPicker.Click += delegate {

                    var dialogShow = new DatePickerDialogFragment(mActivity, BeginDate,mListener);
                    dialogShow.Show(mActivity.FragmentManager.BeginTransaction(), null);
                };

                mRiChaXun.Click += delegate {

                    mLayout1.Visibility = ViewStates.Invisible;

                    if(selectedRi=="")
                    {
                        Toast mToast = Toast.MakeText (mActivity, "请选择日期", ToastLength.Short);
                        mToast.Show ();
                    }
                    else
                    {
                        mProgressBarRi.Visibility = ViewStates.Visible;

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

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

                            BackgroundWorker mworker = sender1 as BackgroundWorker;

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

                                begin=selectedRi;
                                end=selectedRi;
                                HttpRequestLiSHi(begin,end);

                            }

                        };

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

                            if (e1.Cancelled == true) {

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

                            } else {

                                if(internetFlag==1)
                                {
                                    m11.Text="查岗数: "+mbaoBiaoList[mbaoBiaoList.Count-1].changangnum;
                                    m21.Text="缺岗数: "+mbaoBiaoList[mbaoBiaoList.Count-1].queggangnum;
                                    m31.Text="火警数: "+mbaoBiaoList[mbaoBiaoList.Count-1].fireallnum;
                                    m41.Text="误报数: "+mbaoBiaoList[mbaoBiaoList.Count-1].wubaonum;
                                    m51.Text="成灾数: "+mbaoBiaoList[mbaoBiaoList.Count-1].chengzai;
                                    m61.Text="关机数: "+mbaoBiaoList[mbaoBiaoList.Count-1].guanji;
                                    m71.Text="故障数: "+mbaoBiaoList[mbaoBiaoList.Count-1].guzhangnum;
                                    m81.Text="网关数: "+"0";

                                    //m8.Text="网关数: "+mbaoBiaoList[0].netfault;
                                    mActivity.RunOnUiThread (() => {

                                        Animation anim = AnimationUtils.LoadAnimation(mActivity, Resource.Animation.CardView_Slide_up);
                                        mLayout1.StartAnimation(anim);
                                        mLayout1.Visibility = ViewStates.Visible;
                                    });

                                }
                                else{

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

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


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