Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6367693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:34:53+00:00 2026-05-25T00:34:53+00:00

I am trying to the softkeyboard so the user can enter his information to

  • 0

I am trying to the softkeyboard so the user can enter his information to create a new account on my android app. The problem is that some of my TextEdits are always flowing outside the screen and the user can not see what he actually typed. The screen looks this way:

screenshot

This screen was built using the following xml code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="fill_parent">     

    <com.markupartist.android.widget.ActionBar 
       android:id="@+id/actionbar" 
       style="@style/ActionBar"/>      

    <ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1.0">

    <LinearLayout
        android:layout_gravity="bottom"
        android:paddingTop="15dip"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"> 

       <EditText android:id="@+id/txtPhoneNumber" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:nextFocusUp="@+id/LoginButton"
            android:nextFocusDown="@+id/txtPassword" 
            android:hint="Phone Number"
            android:inputType="number" 
            android:singleLine="true" />

       <EditText android:id="@+id/txtPassword" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:hint="Password"
            android:inputType="textPassword"
            android:singleLine="true"
            android:nextFocusDown="@+id/txtName"/>

       <EditText android:id="@+id/txtName" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:hint="Name"
            android:singleLine="true"
            android:nextFocusDown="@+id/txtPin"  /> 

        <EditText android:id="@+id/txtPin" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:hint="Pin"
            android:inputType="number"
            android:singleLine="true" />            

    </LinearLayout>

    </ScrollView>

    <LinearLayout android:id="@+id/buttonsLayout" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip" >    

    <Button android:id="@+id/btnLogin"
        android:layout_width="fill_parent"          
        android:layout_height="wrap_content" 
        android:layout_weight="1.0" 
        android:text="@string/btnLogin"                     
        android:onClick="onRegisterClick" />                            

</LinearLayout>   

And in my AndroidManifest.xml I have defined my Activity this way:

<activity android:name=".activity.NewAccountActivity" 
      android:label="@string/app_name" 
      android:screenOrientation="portrait" 
      android:windowSoftInputMode="stateHidden|adjustResize" />

I have tried my different combinations of layout and windowSoftInputMode, but i never can get the TextEdit that is being changed to be visible on the screen. Am I missing anything here?

Thanks for any reply
T

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:34:54+00:00Added an answer on May 25, 2026 at 12:34 am

    You can use adjustPan to keep the field inside the visible area on the screen:

    android:windowSoftInputMode="stateHidden|adjustPan"
    

    Update:

    Try not using View outside of ScrollView. I’ve changed your layout to have one top-level ScrollView and inner LinearLayout. All other elements are located inside LinearLayout. That’s because Android does not know how to scroll ScrollView correctly when adjusting the screen for soft keyboard.

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:fillViewport="true"
        android:layout_weight="1.0" >    
    
        <LinearLayout
            android:layout_gravity="bottom"
            android:paddingTop="15dip"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" > 
    
           <EditText android:id="@+id/txtPhoneNumber" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dip"
                android:layout_marginRight="15dip"
                android:nextFocusUp="@+id/LoginButton"
                android:nextFocusDown="@+id/txtPassword" 
                android:hint="Phone Number"
                android:inputType="number" 
                android:singleLine="true" />
    
           <EditText android:id="@+id/txtPassword" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dip"
                android:layout_marginLeft="15dip"
                android:layout_marginRight="15dip"
                android:hint="Password"
                android:inputType="textPassword"
                android:singleLine="true"
                android:nextFocusDown="@+id/txtName"/>
    
           <EditText android:id="@+id/txtName" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dip"
                android:layout_marginLeft="15dip"
                android:layout_marginRight="15dip"
                android:hint="Name"
                android:singleLine="true"
                android:nextFocusDown="@+id/txtPin"  /> 
    
            <EditText android:id="@+id/txtPin" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dip"
                android:layout_marginLeft="15dip"
                android:layout_marginRight="15dip"
                android:hint="Pin"
                android:inputType="number"
                android:singleLine="true" />  
    
            <LinearLayout android:id="@+id/buttonsLayout" 
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:layout_marginTop="20dip"
              android:layout_marginLeft="15dip"
              android:layout_marginRight="15dip" 
              android:orientation="vertical">    
    
              <View 
                android:layout_width="fill_parent"          
                android:layout_height="0dp"
                android:layout_weight="1" />
    
                  <Button android:id="@+id/btnLogin"
                      android:layout_width="fill_parent"          
                      android:layout_height="wrap_content"
                      android:text="login"                     
                      android:onClick="onRegisterClick" />                            
    
            </LinearLayout>
    
        </LinearLayout>  
    
    </ScrollView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am tyring to accomplish a part of my app where the user can
Problem statement I'm trying to implement my own virtual keyboard following example softkeyboard, found
Trying to find some information on this but am unable to get any results
Trying to create a simple document that gets the parentNode then applies a background
Trying to reproduce the problem from this question , I've found I can't plot
Trying to read in some information from the google maps api into my application
Trying to find some simple SQL Server PIVOT examples. Most of the examples that
Trying to make a make generic select control that I can dynamically add elements
I'm trying to convince an EditText -view to only use the SoftKeyboard that I
Trying to create an Oracle trigger that runs after a table is updated in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.