gpt4 book ai didi

java - 底部导航栏下方的空间

转载 作者:行者123 更新时间:2023-12-02 04:29:06 25 4
gpt4 key购买 nike

我对 Android studio IDE 不太了解,但我被要求解决这个问题,我以为导航栏下方有一个边距,但我无法识别问题。

enter image description here

无尽的代码

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

最佳答案

好吧,我假设您想要将导航栏移至最底部位置,或者想要使背景内容 View 更短,以便导航栏成为屏幕上最下面的元素。

您需要使用android:layout_marginBottom="-5dp"来实现线性布局

您不一定需要使用 android:layout_alignParentBottom="true" 因为边距设置将覆盖这些对齐方式。

我们可以根据 View 要求调整边距。尝试不同的边距值。

关于java - 底部导航栏下方的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31730335/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com