本文整理汇总了C#中LinearLayout.SetClipChildren方法的典型用法代码示例。如果您正苦于以下问题:C# LinearLayout.SetClipChildren方法的具体用法?C# LinearLayout.SetClipChildren怎么用?C# LinearLayout.SetClipChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.SetClipChildren方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
void Init(IAttributeSet attrs) {
_headerContainer = new FrameLayout(Context);
_zoomContainer = new FrameLayout(Context);
_contentContainer = new FrameLayout(Context);
_rootContainer = new LinearLayout(Context);
_rootContainer.Orientation = Android.Widget.Orientation.Vertical;
if (attrs != null) {
LayoutInflater layoutInflater = LayoutInflater.From(Context);
//初始化状态View
TypedArray a = Context.ObtainStyledAttributes(attrs, Resource.Styleable.PullToZoomScrollView);
int zoomViewResId = a.GetResourceId(Resource.Styleable.PullToZoomScrollView_scrollZoomView, 0);
if (zoomViewResId > 0) {
_zoomView = layoutInflater.Inflate(zoomViewResId, null, false);
_zoomContainer.AddView(_zoomView);
_headerContainer.AddView(_zoomContainer);
}
int headViewResId = a.GetResourceId(Resource.Styleable.PullToZoomScrollView_scrollHeadView, 0);
if (headViewResId > 0) {
_headView = layoutInflater.Inflate(headViewResId, null, false);
_headerContainer.AddView(_headView);
}
int contentViewResId = a.GetResourceId(Resource.Styleable.PullToZoomScrollView_scrollContentView, 0);
if (contentViewResId > 0) {
_contentView = layoutInflater.Inflate(contentViewResId, null, false);
_contentContainer.AddView(_contentView);
}
a.Recycle();
}
DisplayMetrics localDisplayMetrics = new DisplayMetrics();
((Activity) Context).WindowManager.DefaultDisplay.GetMetrics(localDisplayMetrics);
_screenHeight = localDisplayMetrics.HeightPixels;
_zoomWidth = localDisplayMetrics.WidthPixels;
_scalingRunnable = new ScalingRunnable(this);
_rootContainer.AddView(_headerContainer);
_rootContainer.AddView(_contentContainer);
_rootContainer.SetClipChildren(false);
_headerContainer.SetClipChildren(false);
AddView(_rootContainer);
}