我有下一个布局:
更新代码
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/window_background_color"
android:clickable="false">
<!-- Toolbar -->
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="0dp"
android:layout_height="60dp"
android:elevation="1dp"
android:foreground="@drawable/titlebar_1"
android:foregroundGravity="center|fill"
android:minHeight="?attr/actionBarSize"
android:titleTextAppearance="@color/white"
app:layout_constraintBottom_toTopOf="@+id/test"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:popupTheme="@style/Theme.AppCompat">
</android.support.v7.widget.Toolbar>
<!-- tips&tricks -->
<ImageView
android:id="@+id/imageView3"
android:layout_width="247dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
ads:layout_constraintBottom_toTopOf="@+id/test"
ads:layout_constraintEnd_toEndOf="parent"
ads:layout_constraintStart_toStartOf="@+id/toolbar"
ads:srcCompat="@drawable/common_google_signin_btn_text_dark_focused" />
<RelativeLayout
android:id="@+id/test"
android:layout_width="0dp"
android:layout_height="33dp"
android:background="#1c3049"
android:orientation="horizontal"
ads:layout_constraintBottom_toTopOf="@+id/map"
ads:layout_constraintEnd_toEndOf="parent"
ads:layout_constraintHorizontal_bias="0.0"
ads:layout_constraintStart_toStartOf="parent"
ads:layout_constraintTop_toBottomOf="@+id/toolbar">
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
我需要在工具栏前景图像上显示3张图像。但我所有的尝试都失败了。
我需要在红色区域添加三个透明按钮图像。实际的ImageView被工具栏图像隐藏。如何将它放在工具栏上? 对我有什么建议吗?