我想让导航栏位于屏幕的底部。 在最右边会有'上一个'按钮,在左边是'下一个'按钮。 和中心的textview。Android布局问题?
我试过线性和相对布局,但失败了。 当我把宽度=“fill_parent”文本,然后左键消失。
在这里,一个我想:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:id="@+id/rlayout"
android:layout_height="fill_parent"
>
<!-- other content a listview etc.
-->
<LinearLayout android:id="@+id/navigator"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<Button android:id="@+id/prevbtn"
android:background="@drawable/prev" android:onClick="prevPage"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/pageText"
android:text=""
android:gravity="center_horizontal"
android:layout_centerHorizontal="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<Button android:id="@+id/nextbtn"
android:background="@drawable/next"
android:onClick="nextPage"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
非常感谢,我接近成功。唯一的问题是背景图像比原始图像更宽,失去图像比例和质量。将试图解决它,但如果你知道答案请帮助,再次感谢。 – javanes
我解决了它。作为按钮的0重量值,textview的1个重量值。 – javanes