片段上的ImageView不可见

Fus*_*dor -1 android imageview android-fragments

我有一个片段(实际上是一个SupportMapFragment),我想在其上的一个ImageView放置在地图的一角,但并不能覆盖所有的地图片段,只是一点点。我的布局:

<ImageView
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:id="@+id/imagenTick"
    android:background="@color/componente_boton_base_seleccionar_defecto"
    android:scaleType="fitCenter"
    android:adjustViewBounds="true"
    android:src="@drawable/tick"
    android:clickable="false"
    android:contentDescription="ImagenTick"
    android:layout_alignTop="@+id/mapfragment"
    android:layout_alignLeft="@+id/mapfragment"
    android:layout_alignStart="@+id/mapfragment"/>

<fragment
    android:layout_width="match_parent"
    android:layout_height="150dp"
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:id="@+id/mapfragment" />
Run Code Online (Sandbox Code Playgroud)

现在,ImageView在mapFragment后面,并且它不可见。我希望它可见,但是找不到一种方法告诉Android Studio我希望它在地图上使其可见,而不是在后面。

有什么办法可以实现?

谢谢。

Lui*_*rra 5

尝试更改顺序。首先放入您的Fragment,然后放入ImageView。使用RelativeLayout时,最后一个元素应该在顶部。