本文整理汇总了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");
}
}
示例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;
}
示例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);
}
示例4: DestroyItem
public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object @object)
{
container.RemoveView((View)@object);
}
示例5: DestroyItem
public override void DestroyItem(ViewGroup container, Int32 position, Java.Lang.Object objectValue)
{
container.RemoveView((View)objectValue);
}
示例6: DestroyItem
public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object obj)
{
var view = (View)obj;
container.RemoveView(view);
view.Dispose();
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例10: RemoveSpinner
public void RemoveSpinner(ViewGroup rootview)
{
loading = false;
if(loadingcontainer!=null&&loadingcontainer.IsShown){
rootview.RemoveView (loadingcontainer);
}
}
示例11: DestroyItem
public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object objectValue)
{
container.RemoveView(views[position]);
}
示例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);
}
}
示例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);
}