[英]space under bottom navigation bar
我對Android Studio IDE的了解不多,但是我被要求解決此問題,我認為導航欄下方有空白,但是我無法確定問題所在。
無盡的代碼
<TextView android:layout_gravity="center_horizontal"
android:ellipsize="end"
android:singleLine="true"
android:height="15px"
android:gravity="center"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginBottom="55dip"
android:id="@+id/Tab.Title" android:text="@+id/Tab.Title"
style="@style/Tab.Title" />
<LinearLayout android:id="@+id/BottomBarLayout"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="@drawable/tb_background_bottom" android:scaleType="fitXY"
android:layout_alignParentBottom="true" android:weightSum="0"
>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/PreviousBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:src="@drawable/ic_btn_next" android:layout_weight="1">
</ImageButton>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/NewTabBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:src="@drawable/ic_btn_home" android:layout_weight="1"></ImageButton>
</LinearLayout>
好吧,我假設您是想將導航欄移到最底端的位置,還是想使背景視圖變短,以便導航欄是屏幕上的最低元素。
您需要將android:layout_marginBottom="-5dp"
用於linear layout
。
您不必一定使用android:layout_alignParentBottom="true"
因為邊距設置會覆蓋這些對齊方式。
我們可以根據視圖要求調整邊距。 嘗試不同的邊距值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.