xml designe 在底部放置一个Button

</pre><pre name="code" class="html">关键是:使用 RelativeLayout 布局,然后在 Button 里面android:layout_alignParentBottom= "true" 
代码如下:
   <!-- 在底部放置一个Button -->
         <RelativeLayout
			    android:layout_width="match_parent"      
			    android:layout_height="wrap_content"
			    android:layout_margin="6dp"
			    android:orientation = "vertical"
			    android:layout_weight="1" 
			    android:layout_marginTop="10dp">
               <Button
                   android:id="@+id/button_login"
                   android:layout_width="fill_parent"
                   android:layout_height="40dp"
                   android:drawableRight="@drawable/next"
                   android:maxLength="7"
                   android:paddingRight="5dp"     //内部内容与 边框距离
                   android:layout_margin="5dip"   //本边框 与外部的距离
                   android:text="@string/next"
                   android:textColor="@color/white"
                   android:layout_alignParentBottom= "true"          //关键:与父layout 底部对其
                   android:background="@drawable/button_selector2"
                   android:textSize="20sp" />
       </RelativeLayout>

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念