private void addIndicatorViews() { PullMode mode = Mode; FrameLayout refreshableViewWrapper = RefreshableViewWrapper; if (mode.showHeaderLoadingLayout() && null == mIndicatorIvTop) { // If the mode can pull down, and we don't have one set already mIndicatorIvTop = new IndicatorLayout(Context, PullMode.PULL_FROM_START); FrameLayout.LayoutParams @params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); @params.RightMargin = Resources.GetDimensionPixelSize(Resource.Dimension.indicator_right_padding); @params.Gravity = GravityFlags.Top | GravityFlags.Right; refreshableViewWrapper.AddView(mIndicatorIvTop, @params); } else if (!mode.showHeaderLoadingLayout() && null != mIndicatorIvTop) { // If we can't pull down, but have a View then remove it refreshableViewWrapper.RemoveView(mIndicatorIvTop); mIndicatorIvTop = null; } if (mode.showFooterLoadingLayout() && null == mIndicatorIvBottom) { // If the mode can pull down, and we don't have one set already mIndicatorIvBottom = new IndicatorLayout(Context, PullMode.PULL_FROM_END); FrameLayout.LayoutParams @params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); @params.RightMargin = Resources.GetDimensionPixelSize(Resource.Dimension.indicator_right_padding); @params.Gravity = GravityFlags.Bottom | GravityFlags.Right; refreshableViewWrapper.AddView(mIndicatorIvBottom, @params); } else if (!mode.showFooterLoadingLayout() && null != mIndicatorIvBottom) { // If we can't pull down, but have a View then remove it refreshableViewWrapper.RemoveView(mIndicatorIvBottom); mIndicatorIvBottom = null; } }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET: //ORIGINAL LINE: @Override protected LoadingLayoutProxy createLoadingLayoutProxy(final boolean includeStart, final boolean includeEnd) protected override LoadingLayoutProxy CreateLoadingLayoutProxy(bool includeStart, bool includeEnd) { LoadingLayoutProxy proxy = base.CreateLoadingLayoutProxy(includeStart, includeEnd); if (mListViewExtrasEnabled) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final PullMode mode = getMode(); PullMode mode = Mode; if (includeStart && mode.showHeaderLoadingLayout()) { proxy.addLayout(mHeaderLoadingView); } if (includeEnd && mode.showFooterLoadingLayout()) { proxy.addLayout(mFooterLoadingView); } } return(proxy); }