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 7805899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:21:36+00:00 2026-06-02T02:21:36+00:00

have an edittext inside scrollview. (and there are other views inside scrollview above edittext.)

  • 0

have an edittext inside scrollview. (and there are other views inside scrollview above edittext.)
When user presses the edittext, keyboard becames visible and the visible area of the scrollview becames small. Because of that edittext does not shown in the screen. (it does not scroll the scrollview so that edit text will be shown.)
After user presses any key in the keyboard, scrollview scrolls so that edittext becames visible again.


how can i force the scrollview to scroll so that edittext will be visible before user presses on the keyboard?

<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="0dip"
    android:layout_weight="1" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:paddingBottom="0dip"
        android:paddingLeft="0dip"
        android:paddingRight="0dip"
        android:paddingTop="0dip" >


        <include
            layout="@layout/trade_row_item_3cell" />

        <include
            android:id="@+id/rowQuantity"
            layout="@layout/trade_quantity_selection_row_layout" />

        <include
            layout="@layout/trade_row_item_3cell" />

        <include
            layout="@layout/trade_price_selection_et_row_layout" />

        <include
            layout="@layout/trade_row_item_3cell" />

        <include
            layout="@layout/trade_row_item_3cell" />

       <Button
            style="@style/CustomButtonText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_weight="0" />
    </LinearLayout>
</ScrollView>

<include
    layout="@layout/trade_bottom_view" />

Here is the layout(trade_quantity_selection_row_layout) which contains the edittext

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_gravity="left"
android:background="@android:drawable/list_selector_background">
<TextView 
    android:id="@+id/tvLeft"
    android:layout_width="0dip"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:singleLine="true"
    android:textColor="#000000"
    android:paddingLeft="10dip"
    android:gravity="center_vertical"
    android:layout_gravity="center_vertical"/>
<EditText 
    android:id="@+id/etRight"
    android:paddingLeft="10dip"
    android:background="@null"
    android:layout_width="0dip"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:inputType="number"
    android:gravity="center_vertical"
    android:layout_gravity="center_vertical"/>
<ImageView
    android:id="@+id/ivRight"
    android:src="@drawable/proceed"
    android:paddingRight="10dip"
     android:layout_weight="0"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical"/>    

trade_row_item_3cell layout contains linearlayout with edittexts.

  • 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-06-02T02:21:37+00:00Added an answer on June 2, 2026 at 2:21 am

    First get the x/y coordinates of your Edittext using View.getLocationOnScreen (int[] location) ( After the method returns, the array contains the x and y location in that order)

    OR

    This links helps you find the views coordinates – https://stackoverflow.com/a/2761184/28557

    Then

    scrollView.scrollTo(x, y);
    

    hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nasty problem. I have EditText (8 lines) inside ScrollView . And
I have a ListView with EditText inside. Actually, when i touch an element of
I have EditText in my XML as <!-- Inside RelativeLayout --> <EditText android:id=@+id/edtEmail android:layout_width=match_parent
I have an EditText and a Button set next to each other on the
I have an EditText which takes a String from the user and a searchButton.
I have an EditText for an email field. My mobile screen is really small
I have an EditText field for the user to enter their weight in lbs.
i have problem getting text from edittext inside listview when im in last edittext
I have an EditText textBox and I would like to react to the user
I have taken String value from a EditText and set it inside SELECT QUERY

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.