2.1 帧布局
<p>SkinFrameLayout表示帧布局,通常和Tab控件配合使用。</p>
<p>帧布局子组件的大小跟父组件保持一致。</p>
<h2>请看下面的示例</h2>
<h4>效果图</h4>
<p><img src="http://www.skinui.cn/doc/img/2/1/1.png" alt="帧布局1" /></p>
<p><img src="http://www.skinui.cn/doc/img/2/1/2.png" alt="帧布局2" /></p>
<h4>布局文件</h4>
<pre><code class="language-xml">&lt;SkinDialog DefaultWidth=&quot;400&quot; DefaultHeight=&quot;300&quot; SysButton=&quot;CLOSE&quot; Icon=&quot;128&quot; Caption=&quot;IDS_LAYOUT_SHOW1&quot; Animation=&quot;SizeChange&quot; ThemeHeight=&quot;65&quot;&gt;
&lt;SkinRadioGroup Id=&quot;100&quot; LayoutWidth=&quot;210&quot; LayoutHeight=&quot;30&quot; AlignParentLeft=&quot;0&quot; AlignParentTop=&quot;35&quot;&gt;
&lt;SkinRadioButton Id=&quot;101&quot; LayoutWidth=&quot;100&quot; LayoutHeight=&quot;FillParent&quot; ChildText1=&quot;TabFrame1&quot; Image=&quot;TabButton.png&quot; Layout=&quot;TabButton.xml&quot; BindView=&quot;1100&quot; AlignParentLeft=&quot;0&quot; Checked=&quot;true&quot;/&gt;
&lt;SkinRadioButton Id=&quot;102&quot; LayoutWidth=&quot;100&quot; LayoutHeight=&quot;FillParent&quot; ChildText1=&quot;TabFrame2&quot; Image=&quot;TabButton.png&quot; Layout=&quot;TabButton.xml&quot; BindView=&quot;1200&quot; AlignParentLeft=&quot;100&quot; Radius=&quot;5&quot;/&gt;
&lt;/SkinRadioGroup&gt;
&lt;SkinRelativeLayout AlignParentLeft=&quot;10&quot; AlignParentTop=&quot;80&quot; AlignParentRight=&quot;10&quot; AlignParentBottom=&quot;10&quot;&gt;
&lt;SkinFrameLayout Id=&quot;1000&quot; AlignParentLeft=&quot;15&quot; AlignParentTop=&quot;15&quot; AlignParentRight=&quot;15&quot; AlignParentBottom=&quot;15&quot;&gt;
&lt;SkinRelativeLayout Id=&quot;1100&quot; BkgColor=&quot;ID_COLOR_RED&quot;&gt;
&lt;SkinTextView Text=&quot;1&quot; LayoutWidth=&quot;FillParent&quot; LayoutHeight=&quot;FillParent&quot; HorzAlignment=&quot;Center&quot; VertAlignment=&quot;Center&quot; FontColor=&quot;ID_COLOR_WHITE&quot;/&gt;
&lt;/SkinRelativeLayout&gt;
&lt;SkinRelativeLayout Id=&quot;1200&quot; BkgColor=&quot;ID_COLOR_GREEN&quot; Visible=&quot;false&quot;&gt;
&lt;SkinTextView Text=&quot;2&quot; LayoutWidth=&quot;FillParent&quot; LayoutHeight=&quot;FillParent&quot; HorzAlignment=&quot;Center&quot; VertAlignment=&quot;Center&quot; FontColor=&quot;ID_COLOR_WHITE&quot;/&gt;
&lt;/SkinRelativeLayout&gt;
&lt;/SkinFrameLayout&gt;
&lt;/SkinRelativeLayout&gt;
&lt;/SkinDialog&gt;</code></pre>
<p>上面的布局,色块宽度跟父组件同宽,高度跟父组件同高。</p>