Пример #1
0
			protected internal override void setBaseAttributes(android.content.res.TypedArray
				 a, int widthAttr, int heightAttr)
			{
				this.width = MATCH_PARENT;
				if (a.hasValue(heightAttr))
				{
					this.height = a.getLayoutDimension(heightAttr, "layout_height");
				}
				else
				{
					this.height = WRAP_CONTENT;
				}
			}
Пример #2
0
			protected internal override void setBaseAttributes(android.content.res.TypedArray
				 a, int widthAttr, int heightAttr)
			{
				// We don't want to force users to specify a layout_width
				if (a.hasValue(widthAttr))
				{
					width = a.getLayoutDimension(widthAttr, "layout_width");
				}
				else
				{
					width = MATCH_PARENT;
				}
				// We don't want to force users to specify a layout_height
				if (a.hasValue(heightAttr))
				{
					height = a.getLayoutDimension(heightAttr, "layout_height");
				}
				else
				{
					height = WRAP_CONTENT;
				}
			}
Пример #3
0
			/// <summary>Extracts the layout parameters from the supplied attributes.</summary>
			/// <remarks>Extracts the layout parameters from the supplied attributes.</remarks>
			/// <param name="a">the style attributes to extract the parameters from</param>
			/// <param name="widthAttr">the identifier of the width attribute</param>
			/// <param name="heightAttr">the identifier of the height attribute</param>
			protected internal virtual void setBaseAttributes(android.content.res.TypedArray 
				a, int widthAttr, int heightAttr)
			{
				width = a.getLayoutDimension(widthAttr, "layout_width");
				height = a.getLayoutDimension(heightAttr, "layout_height");
			}
Пример #4
0
			protected internal override void setBaseAttributes(android.content.res.TypedArray
				 a, int widthAttr, int heightAttr)
			{
				if (a.hasValue(widthAttr))
				{
					width = a.getLayoutDimension(widthAttr, "layout_width");
				}
				else
				{
					width = WRAP_CONTENT;
				}
				if (a.hasValue(heightAttr))
				{
					height = a.getLayoutDimension(heightAttr, "layout_height");
				}
				else
				{
					height = WRAP_CONTENT;
				}
			}