ImageView在一个不可见的片段上
问题描述:
我有一个片段(实际上是一个SupportMapFragment),我想将一个ImageView放在地图的一个角落上,但不包括所有地图片段,只是一点点。我的布局: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" />
现在,ImageView位于mapFragment后面,并且不可见。我希望它可见,但无法找到告诉Android Studio的方式,我希望它通过地图显示,而不是后面。
有什么办法可以达到这个目的吗?
谢谢。
答
尝试更改订单。首先放入片段,然后放入ImageView。使用RelativeLayout时,最后一个元素应该在最上面。
尝试更改顺序。首先放入片段,然后放入ImageView。使用RelativeLayout时,最后一个元素应该在最上面。 –
工作。如果你把它放在一个答案中,我会upvote你。谢谢! – Fustigador