Я решаю проблему с изображением и текстом в одном прокрутке. Основная проблема заключается в том, что я получаю разную высоту изображения со стороны сервера. Но место с изображением должно быть одинаковым. Теперь высота места изображения динамична. Текст должен быть прокручиваемым с изображением.Android Scroll view Изображение и текст
Есть ли возможность сделать изображение высотой статическим?
Спасибо!
EDIT
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/article_gallery"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="4" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/article_image_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/sipka_l" />
<ImageView
android:id="@+id/article_image"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
<ImageView
android:id="@+id/article_image_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/sipka_p" />
</LinearLayout>
<TextView
android:id="@+id/image_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/tran_dark_gray"
android:gravity="center"
android:padding="@dimen/size_8"
android:textAppearance="@style/xsmallLight" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="6"
android:background="@color/opaq_light"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/size_16" >
<TextView
android:id="@+id/article_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/size_12"
android:textAppearance="@style/normalBold" />
<TextView
android:id="@+id/article_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/xsmall" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</FrameLayout>
Спасибо ответ. Но для каждого разрешения экрана будет одинаковая высота, не будет? Есть ли возможность определить его с коэффициентом отношения, например, 30% всего экрана, а не для полного просмотра прокрутки? Потому что изображение 50dp будет небольшим с высоким разрешением. –