简体   繁体   English

底部导航栏下方的空间

[英]space under bottom navigation bar

I dont have much knowledge of Android studio IDE, but i was asked to fix this problem, i thought there was a margin under the navigation bar but i cant identify the problem. 我对Android Studio IDE的了解不多,但是我被要求解决此问题,我认为导航栏下方有空白,但是我无法确定问题所在。

在此处输入图片说明

Endless CODE 无尽的代码

<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>

Well I am assuming that either you want to shift the navigation bar to bottom most position or you want to make the background matter view shorter so that the navigation bar is the lowermost element on the screen. 好吧,我假设您是想将导航栏移到最底端的位置,还是想使背景视图变短,以便导航栏是屏幕上的最低元素。

You need to make use of android:layout_marginBottom="-5dp" for the linear layout . 您需要将android:layout_marginBottom="-5dp"用于linear layout

You don't need to necessarily use android:layout_alignParentBottom="true" as the margin settings will override those alignments. 您不必一定使用android:layout_alignParentBottom="true"因为边距设置会覆盖这些对齐方式。

We can adjust the margins as per the view requirement. 我们可以根据视图要求调整边距。 Try different margin values. 尝试不同的边距值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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