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


C# android.setVisibility方法代码示例

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


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

示例1: addView

		public override void addView(android.view.View child, int index, android.view.ViewGroup
			.LayoutParams @params)
		{
			base.addView(child, index, @params);
			if (getChildCount() == 1)
			{
				child.setVisibility(android.view.View.VISIBLE);
			}
			else
			{
				child.setVisibility(android.view.View.GONE);
			}
		}
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:13,代码来源:ViewAnimator.cs

示例2: setupStackSlider

		private void setupStackSlider(android.view.View v, int mode)
		{
			mStackSlider.setMode(mode);
			if (v != null)
			{
				mHighlight.setImageBitmap(sHolographicHelper.createResOutline(v, mResOutColor));
				mHighlight.setRotation(v.getRotation());
				mHighlight.setTranslationY(v.getTranslationY());
				mHighlight.setTranslationX(v.getTranslationX());
				mHighlight.bringToFront();
				v.bringToFront();
				mStackSlider.setView(v);
				v.setVisibility(VISIBLE);
			}
		}
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:15,代码来源:StackView.cs

示例3: setViewDrawable

		/// <summary>
		/// Sets the drawable in an image view, makes sure the view is only visible if there
		/// is a drawable.
		/// </summary>
		/// <remarks>
		/// Sets the drawable in an image view, makes sure the view is only visible if there
		/// is a drawable.
		/// </remarks>
		private void setViewDrawable(android.widget.ImageView v, android.graphics.drawable.Drawable
			 drawable, int nullVisibility)
		{
			// Set the icon even if the drawable is null, since we need to clear any
			// previous icon.
			v.setImageDrawable(drawable);
			if (drawable == null)
			{
				v.setVisibility(nullVisibility);
			}
			else
			{
				v.setVisibility(android.view.View.VISIBLE);
				// This is a hack to get any animated drawables (like a 'working' spinner)
				// to animate. You have to setVisible true on an AnimationDrawable to get
				// it to start animating, but it must first have been false or else the
				// call to setVisible will be ineffective. We need to clear up the story
				// about animated drawables in the future, see http://b/1878430.
				drawable.setVisible(false, false);
				drawable.setVisible(true, false);
			}
		}
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:30,代码来源:SuggestionsAdapter.cs

示例4: transformViewForTransition

		internal override void transformViewForTransition(int fromIndex, int toIndex, android.view.View
			 view, bool animate_1)
		{
			if (!animate_1)
			{
				((android.widget.StackView.StackFrame)view).cancelSliderAnimator();
				view.setRotationX(0f);
				android.widget.StackView.LayoutParams lp = (android.widget.StackView.LayoutParams
					)view.getLayoutParams();
				lp.setVerticalOffset(0);
				lp.setHorizontalOffset(0);
			}
			if (fromIndex == -1 && toIndex == getNumActiveViews() - 1)
			{
				transformViewAtIndex(toIndex, view, false);
				view.setVisibility(VISIBLE);
				view.setAlpha(1.0f);
			}
			else
			{
				if (fromIndex == 0 && toIndex == 1)
				{
					((android.widget.StackView.StackFrame)view).cancelSliderAnimator();
					view.setVisibility(VISIBLE);
					int duration = Sharpen.Util.Round(mStackSlider.getDurationForNeutralPosition(mYVelocity
						));
					android.widget.StackView.StackSlider animationSlider = new android.widget.StackView
						.StackSlider(this, mStackSlider);
					animationSlider.setView(view);
					if (animate_1)
					{
						android.animation.PropertyValuesHolder slideInY = android.animation.PropertyValuesHolder
							.ofFloat("YProgress", 0.0f);
						android.animation.PropertyValuesHolder slideInX = android.animation.PropertyValuesHolder
							.ofFloat("XProgress", 0.0f);
						android.animation.ObjectAnimator slideIn = android.animation.ObjectAnimator.ofPropertyValuesHolder
							(animationSlider, slideInX, slideInY);
						slideIn.setDuration(duration);
						slideIn.setInterpolator(new android.view.animation.LinearInterpolator());
						((android.widget.StackView.StackFrame)view).setSliderAnimator(slideIn);
						slideIn.start();
					}
					else
					{
						animationSlider.setYProgress(0f);
						animationSlider.setXProgress(0f);
					}
				}
				else
				{
					if (fromIndex == 1 && toIndex == 0)
					{
						((android.widget.StackView.StackFrame)view).cancelSliderAnimator();
						int duration = Sharpen.Util.Round(mStackSlider.getDurationForOffscreenPosition(mYVelocity
							));
						android.widget.StackView.StackSlider animationSlider = new android.widget.StackView
							.StackSlider(this, mStackSlider);
						animationSlider.setView(view);
						if (animate_1)
						{
							android.animation.PropertyValuesHolder slideOutY = android.animation.PropertyValuesHolder
								.ofFloat("YProgress", 1.0f);
							android.animation.PropertyValuesHolder slideOutX = android.animation.PropertyValuesHolder
								.ofFloat("XProgress", 0.0f);
							android.animation.ObjectAnimator slideOut = android.animation.ObjectAnimator.ofPropertyValuesHolder
								(animationSlider, slideOutX, slideOutY);
							slideOut.setDuration(duration);
							slideOut.setInterpolator(new android.view.animation.LinearInterpolator());
							((android.widget.StackView.StackFrame)view).setSliderAnimator(slideOut);
							slideOut.start();
						}
						else
						{
							animationSlider.setYProgress(1.0f);
							animationSlider.setXProgress(0f);
						}
					}
					else
					{
						if (toIndex == 0)
						{
							view.setAlpha(0.0f);
							view.setVisibility(INVISIBLE);
						}
						else
						{
							if ((fromIndex == 0 || fromIndex == 1) && toIndex > 1)
							{
								view.setVisibility(VISIBLE);
								view.setAlpha(1.0f);
								view.setRotationX(0f);
								android.widget.StackView.LayoutParams lp = (android.widget.StackView.LayoutParams
									)view.getLayoutParams();
								lp.setVerticalOffset(0);
								lp.setHorizontalOffset(0);
							}
							else
							{
								if (fromIndex == -1)
								{
//.........这里部分代码省略.........
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:101,代码来源:StackView.cs

示例5: setViewText

		private void setViewText(android.widget.TextView v, java.lang.CharSequence text)
		{
			// Set the text even if it's null, since we need to clear any previous text.
			v.setText(text);
			if (android.text.TextUtils.isEmpty(text))
			{
				v.setVisibility(android.view.View.GONE);
			}
			else
			{
				v.setVisibility(android.view.View.VISIBLE);
			}
		}
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:13,代码来源:SuggestionsAdapter.cs


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