【发布时间】:2017-08-16 17:29:19
【问题描述】:
我的 Android 应用程序出现问题。我正在尝试修复我的小吃店的布局,因为它不适合我的 BottomBar。如果您看到我发布的图片,您会看到两个项目之间有一个不应该出现的小空间。
我会给你看一些代码。在我的 MainActivity 中有我的 BottomBar 和 FrameLayout。我的 Snackbar 出现在我的 Fragment 上(在那个框架布局中)。
MainActivity.xml:
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/imageview_logo"
android:layout_above="@id/bottomBar"
android:layout_alignParentStart="true">
</FrameLayout>
<com.roughike.bottombar.BottomBar
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
app:bb_tabXmlResource="@xml/bottombar_tabs"
android:layout_height="60dp"
app:bb_inActiveTabColor="@color/inActiveTabColor"
app:bb_inActiveTabAlpha="0.8"
app:bb_activeTabAlpha="1" />
片段.java
This is the java class that shows my Snackbar.
这是问题的图片:
您知道什么可能导致此布局问题吗? 谢谢大家。
【问题讨论】:
-
id 推荐使用 Google 底部工具栏库。这可能会有所帮助 - medium.com/@hitherejoe/…
标签: android xml layout snackbar bottombar