whole lotta love抄袭:Android将ButtonBar放在屏幕底部 ? 转烛空间

来源:百度文库 编辑:偶看新闻 时间:2024/05/02 07:27:21
接上篇《Android将TAB选项卡放在屏幕底部》写。上篇提到ButtonBar的方式写底部button,试了试,看起来外观貌似比Tab好看,不过恐怕没有Tab管理Activity方便吧,毕竟一个Tab就是一个Activity,但是这样用Button的话,却并不如此,所以这样的涉及可能虽然好看点,但是管理起来却是相当麻烦。那么暂且把对activity的管理放在一边,只看界面的设计吧。

 

  要涉及这样的一个buttonbar,主要就是要用到style="@android:style/ButtonBar"这个风格。首先还是来看xml的设计,保存layout/bottombtn.xml


    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent">

 

            android:layout_height="wrap_content" android:id="@+id/textOut"
        android:padding="5px" android:layout_weight="1"/>

            android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:orientation="horizontal">