When i am scrolling through screen , all the text field in that screen shows half text only.. i tried a lot by adjusting size but not getting what is the problem.. can anyone explain me??
Here is my code
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="20dip" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginTop="10dip"
android:background="@drawable/inputtext_background" >
<EditText
android:id="@+id/edit_signup_fname_id"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="15dip"
android:layout_marginRight="15dip"
android:layout_marginTop="10dip"
android:hint="@string/firstname_hint"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginTop="10dip"
android:background="@drawable/inputtext_background" >
<EditText
android:id="@+id/edit_signup_email_id"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="15dip"
android:layout_marginRight="15dip"
android:layout_marginTop="10dip"
android:hint="@string/emailid_hint"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginTop="10dip"
android:background="@drawable/inputtext_background" >
<EditText
android:id="@+id/edit_signup_familyname_id"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="15dip"
android:layout_marginRight="15dip"
android:layout_marginTop="10dip"
android:hint="@string/familyname_hint"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginTop="10dip"
android:background="@drawable/inputtext_background"
android:singleLine="true" >
<EditText
android:id="@+id/edit_signup_familyemail_id"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="15dip"
android:layout_marginRight="15dip"
android:layout_marginTop="10dip"
android:hint="@string/familyemail_hint"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginTop="10dip"
android:background="@drawable/inputtext_background" >
<EditText
android:id="@+id/edit_signup_password_id"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="15dip"
android:layout_marginRight="15dip"
android:layout_marginTop="10dip"
android:hint="@string/password_hint"
android:inputType="textPassword"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginTop="10dip"
android:background="@drawable/inputtext_background" >
<EditText
android:id="@+id/edit_signup_retype_id"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="15dip"
android:layout_marginRight="15dip"
android:layout_marginTop="10dip"
android:hint="@string/retype_hint"
android:inputType="textPassword"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dip"
android:gravity="center_horizontal" >
<Button
android:id="@+id/btn_signup_sign_id"
android:layout_width="150dip"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:background="@drawable/btn_sign_bg"
android:text="@string/sign_up"
android:textColor="#FFFFFF"
android:textSize="20dip" />
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="200dp" />
</LinearLayout>
</ScrollView>
Give margin on either the linear layout or the Edittext. Not on both. The marginTop is cutting the edittext's space
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With