Я хочу, чтобы макет прокручивался над изображением, его рабочий тон, но мне нужно, чтобы изображение также можно было щелкнуть. Как достичь этого?Макет для прокрутки над изображением
КОД:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/article_image"
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_gravity="top"
android:scaleType="fitXY"
android:src="@drawable/ic_launcher" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
**android:paddingTop="150dp"**
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
...so may views...
</LinearLayout>
</ScrollView>
</FrameLayout>
</LinearLayout>
Так как я добавил android:paddingTop="150dp"
макет прокрутка над изображением, но как изображение будет интерактивным сейчас?
удалить FrameLayout –
@PiotrGolinski в этом случае ImageView будет сверху и макет будет ниже этого. – user2056563
Вы закрыли FrameLayout? –