Example #1
0
        private void showSubscriberWidget(bool show, bool animate)
        {
            if (mSubContainer != null)
            {
                mSubContainer.clearAnimation();
                mSubscriberWidgetVisible = show;
                float          dest = show ? 1.0f : 0.0f;
                AlphaAnimation aa   = new AlphaAnimation(1.0f - dest, dest);
                aa.Duration  = animate ? ANIMATION_DURATION : 1;
                aa.FillAfter = true;
                mSubContainer.startAnimation(aa);

                if (show)
                {
                    if (mSubscriberMute != null)
                    {
                        mSubscriberMute.Clickable = true;
                    }

                    mSubContainer.Visibility = View.VISIBLE;
                }
                else
                {
                    if (mSubscriberMute != null)
                    {
                        mSubscriberMute.Clickable = false;
                    }

                    mSubContainer.Visibility = View.GONE;
                }
            }
        }
Example #2
0
		private void fade(int visibility, float startAlpha, float endAlpha)
		{
			android.view.animation.AlphaAnimation anim = new android.view.animation.AlphaAnimation
				(startAlpha, endAlpha);
			anim.setDuration(500);
			startAnimation(anim);
			setVisibility(visibility);
		}
Example #3
0
 private void fade(int visibility, float startAlpha, float endAlpha)
 {
     android.view.animation.AlphaAnimation anim = new android.view.animation.AlphaAnimation
                                                      (startAlpha, endAlpha);
     anim.setDuration(500);
     startAnimation(anim);
     setVisibility(visibility);
 }
Example #4
0
        private void showPubStatusWidget(bool show, bool animate)
        {
            if (mPubStatusContainer != null)
            {
                mPubStatusContainer.clearAnimation();
                mPubStatusWidgetVisible = show;
                float          dest = show ? 1.0f : 0.0f;
                AlphaAnimation aa   = new AlphaAnimation(1.0f - dest, dest);
                aa.Duration  = animate ? ANIMATION_DURATION : 1;
                aa.FillAfter = true;
                mPubStatusContainer.startAnimation(aa);

                if (show && archivingOn)
                {
                    mPubStatusContainer.Visibility = View.VISIBLE;
                }
                else
                {
                    mPubStatusContainer.Visibility = View.GONE;
                }
            }
        }
Example #5
0
        /// <exception cref="org.xmlpull.v1.XmlPullParserException"></exception>
        /// <exception cref="System.IO.IOException"></exception>
        private static android.view.animation.Animation createAnimationFromXml(android.content.Context
                                                                               c, org.xmlpull.v1.XmlPullParser parser, android.view.animation.AnimationSet parent
                                                                               , android.util.AttributeSet attrs)
        {
            android.view.animation.Animation anim = null;
            // Make sure we are on a start tag.
            int type;
            int depth = parser.getDepth();

            while (((type = parser.next()) != org.xmlpull.v1.XmlPullParserClass.END_TAG || parser
                    .getDepth() > depth) && type != org.xmlpull.v1.XmlPullParserClass.END_DOCUMENT)
            {
                if (type != org.xmlpull.v1.XmlPullParserClass.START_TAG)
                {
                    continue;
                }
                string name = parser.getName();
                if (name.Equals("set"))
                {
                    anim = new android.view.animation.AnimationSet(c, attrs);
                    createAnimationFromXml(c, parser, (android.view.animation.AnimationSet)anim, attrs
                                           );
                }
                else
                {
                    if (name.Equals("alpha"))
                    {
                        anim = new android.view.animation.AlphaAnimation(c, attrs);
                    }
                    else
                    {
                        if (name.Equals("scale"))
                        {
                            anim = new android.view.animation.ScaleAnimation(c, attrs);
                        }
                        else
                        {
                            if (name.Equals("rotate"))
                            {
                                anim = new android.view.animation.RotateAnimation(c, attrs);
                            }
                            else
                            {
                                if (name.Equals("translate"))
                                {
                                    anim = new android.view.animation.TranslateAnimation(c, attrs);
                                }
                                else
                                {
                                    throw new java.lang.RuntimeException("Unknown animation name: " + parser.getName(
                                                                             ));
                                }
                            }
                        }
                    }
                }
                if (parent != null)
                {
                    parent.addAnimation(anim);
                }
            }
            return(anim);
        }
Example #6
0
		/// <exception cref="org.xmlpull.v1.XmlPullParserException"></exception>
		/// <exception cref="System.IO.IOException"></exception>
		private static android.view.animation.Animation createAnimationFromXml(android.content.Context
			 c, org.xmlpull.v1.XmlPullParser parser, android.view.animation.AnimationSet parent
			, android.util.AttributeSet attrs)
		{
			android.view.animation.Animation anim = null;
			// Make sure we are on a start tag.
			int type;
			int depth = parser.getDepth();
			while (((type = parser.next()) != org.xmlpull.v1.XmlPullParserClass.END_TAG || parser
				.getDepth() > depth) && type != org.xmlpull.v1.XmlPullParserClass.END_DOCUMENT)
			{
				if (type != org.xmlpull.v1.XmlPullParserClass.START_TAG)
				{
					continue;
				}
				string name = parser.getName();
				if (name.Equals("set"))
				{
					anim = new android.view.animation.AnimationSet(c, attrs);
					createAnimationFromXml(c, parser, (android.view.animation.AnimationSet)anim, attrs
						);
				}
				else
				{
					if (name.Equals("alpha"))
					{
						anim = new android.view.animation.AlphaAnimation(c, attrs);
					}
					else
					{
						if (name.Equals("scale"))
						{
							anim = new android.view.animation.ScaleAnimation(c, attrs);
						}
						else
						{
							if (name.Equals("rotate"))
							{
								anim = new android.view.animation.RotateAnimation(c, attrs);
							}
							else
							{
								if (name.Equals("translate"))
								{
									anim = new android.view.animation.TranslateAnimation(c, attrs);
								}
								else
								{
									throw new java.lang.RuntimeException("Unknown animation name: " + parser.getName(
										));
								}
							}
						}
					}
				}
				if (parent != null)
				{
					parent.addAnimation(anim);
				}
			}
			return anim;
		}
		private void showPublisherWidget(bool show, bool animate)
		{
			if (mPublisherContainer != null)
			{
				mPublisherContainer.clearAnimation();
				mPubControlWidgetVisible = show;
				float dest = show ? 1.0f : 0.0f;
				AlphaAnimation aa = new AlphaAnimation(1.0f - dest, dest);
				aa.Duration = animate ? ANIMATION_DURATION : 1;
				aa.FillAfter = true;
				mPublisherContainer.startAnimation(aa);

				if (show)
				{
					mEndCall.Clickable = true;
					mSwapCamera.Clickable = true;
					mPublisherMute.Clickable = true;
					mPublisherContainer.Visibility = View.VISIBLE;
				}
				else
				{
					mEndCall.Clickable = false;
					mSwapCamera.Clickable = false;
					mPublisherMute.Clickable = false;
					mPublisherContainer.Visibility = View.GONE;
				}
			}
		}
		private void showPubStatusWidget(bool show, bool animate)
		{
			if (mPubStatusContainer != null)
			{
				mPubStatusContainer.clearAnimation();
				mPubStatusWidgetVisible = show;
				float dest = show ? 1.0f : 0.0f;
				AlphaAnimation aa = new AlphaAnimation(1.0f - dest, dest);
				aa.Duration = animate ? ANIMATION_DURATION : 1;
				aa.FillAfter = true;
				mPubStatusContainer.startAnimation(aa);

				if (show && archivingOn)
				{
					mPubStatusContainer.Visibility = View.VISIBLE;
				}
				else
				{
					mPubStatusContainer.Visibility = View.GONE;
				}
			}
		}