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


C# LinearLayout.RemoveAllViews方法代码示例

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


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

示例1: addFileView

		public static void addFileView(Context context, List<BookingDocumentDto> documents, bool isInConference, OnAddFileToView addFiles, DeleteFile deleteFile, LinearLayout llFileAttachment){
			if (addFiles == null) {
				addFiles = new OnAddFileToView (context, deleteFile, isInConference);
			}
			addFiles.InitView (documents);
			llFileAttachment.RemoveAllViews ();
			llFileAttachment.AddView (addFiles);
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:8,代码来源:utilsAndroid.cs

示例2: Uri

		/// <summary>
		/// Gets the meal removed.
		/// </summary>
		/// <param name="url">URL.</param>
		/*private void GetMealRemoved (string url)
		{
			HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create (new Uri (url));
			request.ContentType = "";
			request.Method = "GET";

			// Send the request to the server and wait for the response:
			using (WebResponse response = request.GetResponse()) {
			}

		}*/


		/// <summary>
		///  Loads the recipes based on the meal id and has place to put the recipe results
		/// </summary>
		/// <param name="mealArea">Meal area to put results.</param>
		/// <param name="mealId">Meal identifier to find recipes related to.</param>
		private async void LoadRecipes (LinearLayout mealArea, int mealId)
		{
			mealArea.RemoveAllViews ();
			string user = "tester";

			string url = "/CalendarScreen/GetRecipesForMeal?user=" + user + "&mealId=" + mealId;
			JsonValue json = await WebUtils.getJSONResponseAsync (url);
			ParseRecipes (mealArea, mealId, json);
		}
开发者ID:aliarobinson,项目名称:SpeedyChef_375,代码行数:31,代码来源:MealDesign.cs

示例3: AddAd

		AdView AddAd (LinearLayout adViewContainer, string adid)
		{
			AdView adView = null;

			if (adViewContainer != null && !string.IsNullOrEmpty (adid)) {
				adViewContainer.RemoveAllViews ();

				adView = new AdView (this) {
					AdSize = AdSize.SmartBanner,
					AdUnitId = adid,
				};

				adViewContainer.AddView (adView);
				adView.LoadAd (new AdRequest.Builder ().Build ());
			}

			return adView;
		}
开发者ID:foxanna,项目名称:SimpleLocationAlarm,代码行数:18,代码来源:BaseAlarmActivity.cs

示例4: GetSampleContent


//.........这里部分代码省略.........
			mail1.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail1.SetPadding(20,10,10,5);
			mail2.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail2.SetPadding(20,10,10,5);
			mail3.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail3.SetPadding(20,10,10,5);
			mail4.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail4.SetPadding(20,10,10,5);
			mail9.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail9.SetPadding(20,10,10,5);
			mail10.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail10.SetPadding(20,10,10,5);
			mail11.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
			mail11.SetPadding(20,10,10,5);

			inboxLayout.SetPadding(20,0,20,20);
			inboxLayout.AddView(mail1);
			inboxLayout.AddView(separate4,layoutParams5);
			inboxLayout.AddView(mail2);
			inboxLayout.AddView(separate1,layoutParams5);
			inboxLayout.AddView(mail3);
			inboxLayout.AddView(separate5,layoutParams5);
			inboxLayout.AddView(mail4);
			inboxLayout.AddView(separate3,layoutParams5);
			inboxLayout.AddView(mail9);
			inboxLayout.AddView(separate7,layoutParams5);
			inboxLayout.AddView(mail10);
			inboxLayout.AddView(separate11,layoutParams5);
			inboxLayout.AddView(mail11);
			inboxLayout.AddView(separate10,layoutParams5);

			img2.Click+= (object sender, EventArgs e) => {

				ContentFrame.RemoveAllViews();
				inboxLayout.RemoveAllViews();
				inboxLayout.SetPadding(20,0,20,20);
				inboxLayout.AddView(mail1);
				inboxLayout.AddView(separate4,layoutParams5);
				inboxLayout.AddView(mail2);
				inboxLayout.AddView(separate1,layoutParams5);
				inboxLayout.AddView(mail3);
				inboxLayout.AddView(separate5,layoutParams5);
				inboxLayout.AddView(mail4);
				inboxLayout.AddView(separate3,layoutParams5);
				inboxLayout.AddView(mail9);
				inboxLayout.AddView(separate7,layoutParams5);
				inboxLayout.AddView(mail10);
				inboxLayout.AddView(separate11,layoutParams5);
				inboxLayout.AddView(mail11);
				inboxLayout.AddView(separate10,layoutParams5);
				ContentFrame.AddView(inboxLayout);
				textView.Text="Inbox";

			};

			/**
         * Outbox content
         */


			LinearLayout outboxlayout=new LinearLayout(context);
			outboxlayout.LayoutParameters=(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent));
			outboxlayout.SetBackgroundColor(Color.White);
			outboxlayout.Orientation=(Orientation.Vertical);
			LinearLayout mail5=new LinearLayout(context);
			TextView textView20 = new TextView(context);
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:67,代码来源:NavigationDrawer.cs

示例5: openDrawer

        private void openDrawer(object sender, EventArgs e)
        {
            ImageButton button = (ImageButton)sender;
            if (!drawerState)
                RunOnUiThread(() => drawer.Close());

            drawerState = true;
            LinearLayout content = FindViewById<LinearLayout>(Resource.Id.content);
            LinearLayout v = new LinearLayout(context);
            v.RemoveAllViews();
            content.RemoveAllViews();
            RunOnUiThread(() => sliderToggle.SetBackgroundResource(Resource.Drawable.scrolldown));
            switch (button.Id)
            {
                case Resource.Id.imgColour:
                    Intent r = new Intent(this, typeof(ColorPickerDialog));
                    StartActivityForResult(r, COLOR);
                    break;
                case Resource.Id.imgConfig:
                    v = createConfigPicker();
                    RunOnUiThread(delegate
                    {
                        content.AddView(v);
                        drawer.Open();
                    });

                    drawerState = false;
                    break;
                case Resource.Id.imgPaint:
                    v = createPaintBrushes();
                    RunOnUiThread(delegate
                    {
                        content.AddView(v);
                        drawer.Open();
                    });

                    drawerState = false;
                    break;
                case Resource.Id.imgStamp:
                case Resource.Id.imgText:
                case Resource.Id.imgComix:
                    Intent i = new Intent(this, typeof(Messages.ContentPackActivity));
                    if (button.Id == Resource.Id.imgStamp)
                    {
                        i.PutExtra("pack", 4);
                        i.PutExtra("animated", true);
                        i.PutExtra("fromanimated", true);
                        StartActivityForResult(i, STAMP);
                    } else
                    {
                        if (button.Id == Resource.Id.imgText)
                        {
                            i.PutExtra("pack", 0);
                            i.PutExtra("animated", true);
                            i.PutExtra("fromanimated", true);
                            StartActivityForResult(i, TEXT);
                        } else
                        {
                            i.PutExtra("pack", 2);
                            i.PutExtra("animated", true);
                            i.PutExtra("fromanimated", true);
                            StartActivityForResult(i, COMIX);
                        }
                    }
                    break;
                case Resource.Id.imgSound:
                case Resource.Id.imgPicture:
                    ShowModalPreviewDialog(button.Id == Resource.Id.imgPicture ? 0 : 1);
                    break;
            }
        }
开发者ID:chimpinano,项目名称:WowZapp-Android,代码行数:71,代码来源:CreateAnimationActivity.cs

示例6: CreateRect

 /// <summary>
 /// �����������
 /// </summary>
 /// <param name="llRects"></param>
 public void CreateRect(LinearLayout llRects)
 {
     llRects.RemoveAllViews();
     //��ͼ��ÿ��ͼƬ�ÿ�߶�һ��
     Bitmap[] mBitmaps = new Bitmap[5]{
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_jian)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_ling)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_qianzhong)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_yao)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_yexia)).Bitmap
     };
     Bitmap[] sBitmaps = new Bitmap[5] {
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_jian_selected)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_ling_selected)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_qianzhong_selected)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_yao_selected)).Bitmap,
         ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.s_yexia_selected)).Bitmap
     };
     Bitmap line = ((BitmapDrawable)Resources.GetDrawable(Resource.Drawable.game_line)).Bitmap;
     RectsView rectsView = new RectsView(this, null, mBitmaps, sBitmaps, line, shengDaoSelected);
     rectsView.LayoutParameters = new LinearLayout.LayoutParams(line.Width, line.Height);
     shengDaoSelected.RectsView = rectsView;
     llRects.AddView(rectsView);
 }
开发者ID:i-1213,项目名称:Game,代码行数:28,代码来源:GameActivity.cs


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