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


C# ViewGroup.RemoveView方法代码示例

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


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

示例1: ClearUpViewGroup

 private static void ClearUpViewGroup(ViewGroup grp)
 {
     try
     {
         for (int i = 0; i < grp.ChildCount; i++)
         {
             var view = grp.GetChildAt(i);
             var viewGroup = view as ViewGroup;
             if (viewGroup != null)
             {
                 ClearUpViewGroup(viewGroup);
                 grp.RemoveView(viewGroup);
                 viewGroup.Dispose();
                 continue;
             }
             var imageView = view as ImageView;
             if (imageView != null)
                 imageView.Recycle();
             grp.RemoveView(view);
             view.Dispose();
             view = null;
         }
     }
     catch
     {
         Console.WriteLine("ClearUpViewGroup Exception");
     }
 }
开发者ID:valentingrigorean,项目名称:NUtils,代码行数:28,代码来源:ViewGroupExetension.cs

示例2: DestroyItem

 public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object @object)
 {
     ScaleImageView SIV = views [position];
     container.RemoveView ((View)@object);
     SIV.SetImageBitmap (null);
     views [position] = null;
     bitmaps [position] = null;
 }
开发者ID:baitun,项目名称:BGUEP-Journal,代码行数:8,代码来源:SimplePagerAdapter.cs

示例3: ShadowWrapper

		public ShadowWrapper (Android.Content.Context context, ViewGroup realContent) : base (context)
		{
			Content = realContent;
			OriginalParent = realContent.Parent as ViewGroup;
			OriginalParent.RemoveView (realContent);
			this.SetMinimumHeight (realContent.Height);
			this.SetMinimumWidth (realContent.Width);
			this.AddView (realContent, new LinearLayout.LayoutParams (LinearLayout.LayoutParams.FillParent,
				LinearLayout.LayoutParams.FillParent));
			OriginalParent.AddView (this, new LinearLayout.LayoutParams (LinearLayout.LayoutParams.FillParent,
				LinearLayout.LayoutParams.FillParent));
			this.SetBackgroundColor (Android.Graphics.Color.Red);

		}
开发者ID:DevinvN,项目名称:TwinTechsFormsLib,代码行数:14,代码来源:ViewMaskExtensionProvider.cs

示例4: DestroyItem

			public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object @object)
			{
				container.RemoveView((View)@object);
			}
开发者ID:hugoterelle,项目名称:PagerSlidingTabStrip.Net,代码行数:4,代码来源:QuickContactFragment.cs

示例5: DestroyItem

 public override void DestroyItem(ViewGroup container, Int32 position, Java.Lang.Object objectValue)
 {
     container.RemoveView((View)objectValue);
 }
开发者ID:MuffPotter,项目名称:Xamarin.Plugins,代码行数:4,代码来源:FontIconsViewPagerAdapter.cs

示例6: DestroyItem

 public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object obj)
 {
     var view = (View)obj;
     container.RemoveView(view);
     view.Dispose();
 }
开发者ID:ExRam,项目名称:Cheesebaron.MvvmCross.Bindings,代码行数:6,代码来源:MvxBindablePagerAdapter.cs

示例7: DestroyItem

 public override void DestroyItem(ViewGroup container, int position, Object @object)
 {
     var dataContext = @object.DataContext();
     if (position != PositionNone)
         position = GetPosition(dataContext);
     bool removed = position == PositionNone;
     if (removed && dataContext != null)
         ServiceProvider.AttachedValueProvider.Clear(dataContext, ContentPath);
     var fragment = @object as Fragment;
     if (fragment == null)
     {
         var view = (View)@object;
         container.RemoveView(view);
         if (removed)
             view.ClearBindingsRecursively(true, true);
     }
     else
     {
         if (_currentTransaction == null)
             _currentTransaction = _fragmentManager.BeginTransaction();
         if (removed)
             _currentTransaction.Remove(fragment);
         else
             _currentTransaction.Detach(fragment);
     }
 }
开发者ID:MuffPotter,项目名称:MugenMvvmToolkit,代码行数:26,代码来源:ItemsSourcePagerAdapter.cs

示例8: DestroyItem

        public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object @object)
        {
            Console.WriteLine("Destroying item");

            lock (syncObject)
            {
                // get the view and remove from container
                ScaleImageView currentView = views[position];

                container.RemoveView(currentView);

                // clean view
                currentView.SetImageBitmap(null);

                views[position] = null;

                // dispose the corresponding bitmap
                ReplaceBitmap(position, null);
            }
        }
开发者ID:baitun,项目名称:BGUEP-Journal,代码行数:20,代码来源:EasyPagerAdapter.cs

示例9: SetupGravity

        private void SetupGravity(ViewGroup view)
        {
            LinearLayout itemRoot = (LinearLayout)view;
            GravityFlags gravityInt = GravityExt.GetGravity(itemGravity);
            itemRoot.SetGravity(gravityInt | GravityFlags.CenterVertical);

            if (view.ChildCount == 2)
            {
                if (itemGravity == GravityEnum.End && !IsRtl() && view.GetChildAt(0) is CompoundButton)
                {
                    CompoundButton first = (CompoundButton)view.GetChildAt(0);
                    view.RemoveView(first);

                    TextView second = (TextView)view.GetChildAt(0);
                    view.RemoveView(second);
                    second.SetPadding(second.PaddingRight, second.PaddingTop,
                        second.PaddingLeft, second.PaddingBottom);

                    view.AddView(second);
                    view.AddView(first);
                }
                else if (itemGravity == GravityEnum.Start && IsRtl() && view.GetChildAt(1) is CompoundButton)
                {
                    CompoundButton first = (CompoundButton)view.GetChildAt(1);
                    view.RemoveView(first);

                    TextView second = (TextView)view.GetChildAt(0);
                    view.RemoveView(second);
                    second.SetPadding(second.PaddingRight, second.PaddingTop,
                        second.PaddingRight, second.PaddingBottom);

                    view.AddView(first);
                    view.AddView(second);
                }
            }
        }
开发者ID:devxiaruwei,项目名称:MaterialDialogs,代码行数:36,代码来源:MaterialDialogAdapter.cs

示例10: RemoveSpinner

 public void RemoveSpinner(ViewGroup rootview)
 {
     loading = false;
     if(loadingcontainer!=null&&loadingcontainer.IsShown){
         rootview.RemoveView (loadingcontainer);
     }
 }
开发者ID:MADMUC,项目名称:TAP5050,代码行数:7,代码来源:Tap5050Fragment.cs

示例11: DestroyItem

 public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object objectValue)
 {
     container.RemoveView(views[position]);
 }
开发者ID:hwqdt,项目名称:Demos,代码行数:4,代码来源:ViewPagerAdapter.cs

示例12: DestroyItem

 public override void DestroyItem(ViewGroup container, int position, Object @object)
 {
     var dataContext = @object.DataContext();
     if (position != PositionNone)
         position = GetPosition(dataContext);
     bool removed = position == PositionNone;
     var fragment = @object as Fragment;
     if (fragment == null)
     {
         var view = (View)@object;
         container.RemoveView(view);
     }
     else
     {
         if (_currentTransaction == null)
             _currentTransaction = _fragmentManager.BeginTransaction();
         if (removed)
             _currentTransaction.Remove(fragment);
         else
             _currentTransaction.Detach(fragment);
     }
 }
开发者ID:dbeattie71,项目名称:MugenMvvmToolkit,代码行数:22,代码来源:ItemsSourcePagerAdapter.cs

示例13: DestroyItem

 public override void DestroyItem(ViewGroup container, int position, Object objectValue)
 {
     GC.Collect(); // feel my pain bro
     imageLoader.ClearMemoryCache();
     container.RemoveView(objectValue as View);
 }
开发者ID:Ontropix,项目名称:xatropix,代码行数:6,代码来源:SimpleCarouselAdapter.cs


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