0

I created a ScrollView with three ImageButtons in it. However, the images in the ScrollView are cut off on the sides. I can't see the entire image. How can I fix this?

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/searchbar"
        android:layout_marginLeft="30dp"
        android:layout_marginRight="30dp"
        android:layout_marginTop="10dp"
        android:layout_above="@+id/menubar">

        <LinearLayout
            android:id="@+id/scrolldown"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <ImageButton
                android:id="@+id/article1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:srcCompat="@drawable/image1"
                android:layout_weight="1"
                android:includeFontPadding="false"/>
            <ImageButton
                android:id="@+id/article2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:src="@drawable/image2"
                android:layout_marginBottom="10dp"/>
            <ImageButton
                android:id="@+id/article3"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:src="@drawable/img_1"
                android:background="@drawable/round_corners"/>
        </LinearLayout>
 
</ScrollView>

Image

As you can see, the sides of the image are cut off.

  • Does this answer your question? [ScrollView Layout does not fill the whole screen](https://stackoverflow.com/questions/15094928/scrollview-layout-does-not-fill-the-whole-screen) – BroscR Oct 24 '22 at 14:48
  • Can you add the ui. screen that you want to achieve?? @ivan-her – Tanishq Chawda Oct 24 '22 at 19:13

0 Answers0