0
У меня есть один Layout
с центром в моем ScrollView
и я хочу поставить ImageView
чуть выше этого Layout
, не двигаясь с его позиции.Разместите макет над другим одним центрированным
Как я могу достичь этого?
Вот мой код:
<ScrollView
android:id="@+id/scrollViewMain"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
// LinearLayout with elements centered in ScrollView
<LinearLayout
android:id="@+id/linearLayoutMain2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:layout_gravity="center"
android:gravity="center"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical" >
...Elements inside layout...
</LinearLayout>
</ScrollView>
//ImageView I want to put just above LinearLayout without moving its position:
<ImageView
android:id="@+id/imageViewLogoFactor_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_factorenergia" />
Да, отлично! Я попытался с RelativeLayout, но я забыл 'android: layout_centerInParent =" true "' – Lyd