繁体   English   中英

底部导航栏下方的空间

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM