コード例 #1
0
ファイル: AnimationUtils.cs プロジェクト: zhouweiaccp/XobotOS
        /// <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
ファイル: AnimationUtils.cs プロジェクト: hakeemsm/XobotOS
		/// <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
ファイル: ViewGroup.cs プロジェクト: hakeemsm/XobotOS
		/// <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;
			}
		}