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


C# LinearLayout.RemoveAllViewsInLayout方法代码示例

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


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

示例1: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);
            Window.AddFlags (WindowManagerFlags.KeepScreenOn);
            SetContentView (Resource.Layout.previewSoundFX);

            if (MessageReceivedUtil.userFrom != null) {
                UserDB user = UserDB.ConvertFromUser (MessageReceivedUtil.userFrom);
                Header.headertext = user.FirstName + " " + user.LastName;
                MessageReceivedUtil.userFrom = null;
            } else {
                if (MessagePlaybackUtil.recipients != null) {
                    for (int i = 0; i < MessagePlaybackUtil.recipients.Count; ++i) {
                        if (MessagePlaybackUtil.recipients [i] != null) {
                            Header.headertext = MessagePlaybackUtil.recipients [i].FirstName + " " + MessagePlaybackUtil.recipients [i].LastName;
                            break;
                        }
                    }
                    //}
                } else
                    Header.headertext = "Ann Onymouse";
            }
            linView = FindViewById<LinearLayout> (Resource.Id.linearHolder);
            context = linView.Context;

            ImageView btns = FindViewById<ImageView> (Resource.Id.imgNewUserHeader);
            TextView header = FindViewById<TextView> (Resource.Id.txtFirstScreenHeader);
            RelativeLayout relLayout = FindViewById<RelativeLayout> (Resource.Id.relativeLayout1);
            ImageHelper.setupTopPanel (btns, header, relLayout, header.Context);
            Header.fontsize = 36f;
            ImageHelper.fontSizeInfo (header.Context);
            header.SetTextSize (Android.Util.ComplexUnitType.Dip, Header.fontsize);
            header.Text = Header.headertext;

            parent = linView;
            //preview = FindViewById<ImageView> (Resource.Id.imgComicon);
            progress = FindViewById<ProgressBar> (Resource.Id.prgPreview);
            co = base.Intent.GetIntExtra ("position", 0);
            counter = MessagePlaybackUtil.messageSteps.Count;
            dbm = wowZapp.LaffOutOut.Singleton.dbm;
            isPlaying = false;

            stepID = Guid.Empty;

            #if DEBUG
            System.Diagnostics.Debug.WriteLine ("number of steps = {0}", counter);
            #endif
            linView.RemoveAllViewsInLayout ();
            t = new System.Timers.Timer ();
            t.Interval = 2500;
            t.Elapsed += new System.Timers.ElapsedEventHandler (t_Elapsed);

            increments = 100 / (counter + 1);

            if (co != 0) {
                RunOnUiThread (() => progress.Progress = co * increments);
                increments *= co + co;
            }

            if (MessagePlaybackUtil.markAsRead) {
                ThreadPool.QueueUserWorkItem (delegate {
                    Guid messageID = MessagePlaybackUtil.messageSteps [0].MessageID;

                    LOLMessageClient service = new LOLMessageClient (LOLConstants.DefaultHttpBinding, LOLConstants.LOLMessageEndpoint);
                    service.MessageMarkReadCompleted += Service_MessageMarkReadCompleted;
                    service.MessageMarkReadAsync (messageID, AndroidData.CurrentUser.AccountID, AndroidData.NewDeviceID, new Guid (AndroidData.ServiceAuthToken), messageID);
                });
            }

            ImageButton btnPreAdd = FindViewById<ImageButton> (Resource.Id.imgAdd);
            btnPreAdd.Tag = 1;
            ImageButton btnBack = FindViewById<ImageButton> (Resource.Id.btnBack);
            btnBack.Tag = 0;
            btnBack.Click += delegate {
                Window.ClearFlags (WindowManagerFlags.KeepScreenOn);
                Finish ();
            };
            LinearLayout bottom = FindViewById<LinearLayout> (Resource.Id.bottomHolder);
            ImageButton[] buttons = new ImageButton[2];
            buttons [0] = btnBack;
            buttons [1] = btnPreAdd;
            ImageHelper.setupButtonsPosition (buttons, bottom, context);

            if (MessageReceivedUtil.readOnly)
                btnPreAdd.Visibility = ViewStates.Invisible;
            else
                btnPreAdd.Click += delegate {
                    StartActivity (typeof(ComposeMessageChooseContent));
                };
            #if DEBUG
            int m = 0;
            foreach (MessageStep eachMessageStep in MessagePlaybackUtil.messageSteps)
                System.Diagnostics.Debug.WriteLine ("step {0} = {1}", m++, eachMessageStep.StepType.ToString ());
            #endif

            RunOnUiThread (delegate {
                PrepareViews (co);
            });
        }
开发者ID:chimpinano,项目名称:WowZapp-Android,代码行数:99,代码来源:MessagePlaybackController.cs


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