Esempio n. 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);
        }
Esempio n. 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;
		}