【发布时间】:2018-02-24 06:10:22
【问题描述】:
我正在开发一个安卓应用程序。
我开发了这个东西
但我需要像这样在所选菜单项后面开发一个框。
这是我需要的
我希望你能帮助我开发这个。
这是我的代码
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="project.andromeeda.testproject.MainActivity">
<FrameLayout
android:id="@+id/replace"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
android:background="#ddd"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation"
app:itemBackground="@drawable/list"
app:itemTextColor="@color/grey"/>
</android.support.constraint.ConstraintLayout>
现在它只显示没有文字或图标的背景颜色。
【问题讨论】:
-
显示你的xml代码
标签: android android-layout android-xml android-menu bottomnavigationview