how can you immobilize an image in a scrollview?

0

We have a scrollview wrapping a relative layout where there are two imageview on top of each other, how can you do that: when scrolling, one imageview moves and the other does not? thanks

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="vertical"
            android:scrollbars="vertical">


            <RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">


                <ImageView
                    android:id="@+id/imagenpregunta"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    app:srcCompat="@drawable/imagen" />

                <ImageView
                    android:id="@+id/imagen_no_mover"
                    android:layout_width="200dp"
                    android:layout_height="60dp"

                    android:layout_alignParentRight="true"
                    android:layout_alignParentTop="true"
                    app:srcCompat="@drawable/imagen2" />
            </RelativeLayout>

            <TextView

                android:id="@+id/pregunta"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="15dp"
                android:text="algo"
                android:textAppearance="@style/TextAppearance"
                android:textColor="@android:color/background_light"
                android:textSize="20dp" />

            <Button

                android:id="@+id/button"
                android:layout_width="300dp"
                android:layout_height="80dp"
                android:background="@drawable/boton1"
                android:text="Observar"
                android:textAppearance="@style/TextAppearance"
                android:textColor="#a80d0d"
                android:textSize="20dp"
                android:textStyle="bold" />



        </LinearLayout>
 </ScrollView>
    
asked by tutio 23.01.2018 в 16:12
source

0 answers