所以基本上我想要的高度,有一半为Android的屏幕和B是在上留下A.所以A的顶部上方就像一个背景图像和B例如,你可以说例如像一张脸一样的图片。我如何解决这个问题?
这是我迄今为止,但它似乎没有工作?也许我使用Relativelayout不正确?我需要像一个div这样的容器。我假设如果我把它包装在一个relativelayout或类似div的东西,它会解决,但它不会。
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5">
<ImageView
android:id="@+id/bground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src= "@drawable/background" />
<ImageView
android:id="@+id/profileimage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src= "@drawable/face" />
</RelativeLayout>
</LinearLayout>
非常感谢你,我正在寻找什么! – DiderDrogba344