所以基本上我想要的高度,有一半爲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