Reputation: 279
As you can see with this photo :
I'm creating a form who is not complete due to the height of the Android screen (I can't add new button, text etc).
I searched on the internet how to change the height of the screen , so I could finish my form.
People say to add a ScrollView
So i added it in my layout XML code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_form"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="info.androidhive.navigationdrawer.activity.FormActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="Ajouter Votre Annonce" />
<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="34dp"
android:layout_below="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<RadioButton
android:id="@+id/radioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="23dp"
android:text="RadioButton"
android:layout_below="@+id/spinner"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<RadioButton
android:id="@+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/radioButton"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="RadioButton" />
<Spinner
android:id="@+id/spinner3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/radioButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="24dp" />
<Spinner
android:id="@+id/spinner4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/spinner3"
android:layout_marginTop="17dp" />
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="Entrer le Titre de votre Annonce"
android:layout_below="@+id/spinner4"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<EditText
android:id="@+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText"
android:layout_marginTop="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="Description"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</ScrollView>
But nothing changed.
Upvotes: 0
Views: 1376
Reputation: 76
You can hide the above views while you are creating the below views by doing visibility GONE. Then it will show new views in the preview. After you are done just remove the visibility tag from above views and you are good to go :)
Upvotes: 2
Reputation: 591
Switch to "Text" and write it manually. Or simply drag the layout to make it longer.
Upvotes: 4
Reputation: 163
May be you should try switching to another device? You are currently testing on "Nexus 4".
Note: I think what you really must do– is to adjust jour form field heights to fit into small screens too!
Upvotes: 2