我試圖在屏幕頂部放置圖像視圖,但它在其上方和下方都有一些類型的邊距。所以我嘗試了adjustViewBounds = true,它工作,但它不會達到屏幕的兩側。我只是希望它與屏幕頂部齊平,併到達兩側。有什麼建議麼?無法讓imageview與屏幕頂部齊平
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
tools:context="${packageName}.${activityClass}"
android:orientation="vertical" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/title_bar"/>
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="200dp" >
<LinearLayout
android:id="@+id/goals"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:color/black" >
</RelativeLayout>
發佈您的佈局XML。 – Karakuri
我發佈了xml – user3741413