I put ScrollView
in one of my layouts
, to allow users with smaller screens to see the whole information.
The problem is that when I start the application on my phone (5.5 '') I will see a white band above the layout
:
Thecodexml
oflayout
isasfollows:
<ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:overScrollMode="ifContentScrolls"
android:fillViewport="true"
>
<RelativeLayout
android:id="@+id/activity_main_apresentation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorBackGround">
<ImageView
android:id="@+id/imagetoMain"
android:layout_width="wrap_content"
android:layout_height="400dp"
android:contentDescription="ola"
android:src="@drawable/cakelogomain"
/>
<TextView
android:id="@+id/txttoDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imagetoMain"
android:layout_centerHorizontal="true"
android:text="@string/description"
android:textColor="@color/colorSecondBackGround"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/texttoViewTodscr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/txttoDescription"
android:gravity="center_horizontal"
android:text="@string/descriptionTwo"
android:textColor="@color/colorSecondBackGround"
android:textSize="10sp" />
<Button
android:id="@+id/idButton"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_below="@id/texttoViewTodscr"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="@color/colorSecondBackGround"
android:text="@string/botaoMainTransition"
android:textColor="@color/colorWhite" />
</RelativeLayout>
</ScrollView>
Can anyone give me an explanation of why this happens?
Any better way to adapt my layouts
to smaller screens?