示例#1
0
        /// <exception cref="org.xmlpull.v1.XmlPullParserException"></exception>
        /// <exception cref="System.IO.IOException"></exception>
        private static android.view.animation.LayoutAnimationController createLayoutAnimationFromXml
            (android.content.Context c, org.xmlpull.v1.XmlPullParser parser, android.util.AttributeSet
            attrs)
        {
            android.view.animation.LayoutAnimationController controller = null;
            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 ("layoutAnimation".Equals(name))
                {
                    controller = new android.view.animation.LayoutAnimationController(c, attrs);
                }
                else
                {
                    if ("gridLayoutAnimation".Equals(name))
                    {
                        controller = new android.view.animation.GridLayoutAnimationController(c, attrs);
                    }
                    else
                    {
                        throw new java.lang.RuntimeException("Unknown layout animation name: " + name);
                    }
                }
            }
            return(controller);
        }
示例#2
0
		/// <exception cref="org.xmlpull.v1.XmlPullParserException"></exception>
		/// <exception cref="System.IO.IOException"></exception>
		private static android.view.animation.LayoutAnimationController createLayoutAnimationFromXml
			(android.content.Context c, org.xmlpull.v1.XmlPullParser parser, android.util.AttributeSet
			 attrs)
		{
			android.view.animation.LayoutAnimationController controller = null;
			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 ("layoutAnimation".Equals(name))
				{
					controller = new android.view.animation.LayoutAnimationController(c, attrs);
				}
				else
				{
					if ("gridLayoutAnimation".Equals(name))
					{
						controller = new android.view.animation.GridLayoutAnimationController(c, attrs);
					}
					else
					{
						throw new java.lang.RuntimeException("Unknown layout animation name: " + name);
					}
				}
			}
			return controller;
		}
示例#3
0
		/// <summary>
		/// Sets the layout animation controller used to animate the group's
		/// children after the first layout.
		/// </summary>
		/// <remarks>
		/// Sets the layout animation controller used to animate the group's
		/// children after the first layout.
		/// </remarks>
		/// <param name="controller">the animation controller</param>
		public virtual void setLayoutAnimation(android.view.animation.LayoutAnimationController
			 controller)
		{
			mLayoutAnimationController = controller;
			if (mLayoutAnimationController != null)
			{
				mGroupFlags |= FLAG_RUN_ANIMATION;
			}
		}