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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:14:08+00:00 2026-06-12T17:14:08+00:00

I have TextView in RelativeLayout, which works properly: <TextView android:id=@+id/tv_client_in android:layout_width=wrap_content android:layout_height=wrap_content android:layout_above=@+id/tv_label_client_out android:layout_alignParentLeft=true

  • 0

I have TextView in RelativeLayout, which works properly:

<TextView
    android:id="@+id/tv_client_in"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/tv_label_client_out"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/tv_label_client_in"
    android:background="@drawable/border"
    android:ems="10" />

Now I need to place this TextView inside of ScrollView:

<ScrollView android:id="@+id/sv_client_in"
    android:layout_width="fill_parent" 
    android:layout_height="match_parent"
    android:layout_above="@+id/tv_label_client_out"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/tv_label_client_in"
    android:background="@drawable/border"
    android:fillViewport="true"
    >

    <TextView
        android:id="@+id/tv_client_in"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:ems="10"
         />

</ScrollView>

After this change layout looks OK (first image), but when keyboard is shown, it is corrupted (second image). How can I fix this?

Good

Bad

Full layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
    android:id="@+id/tv_label_client_host"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:layout_marginTop="20dp"
    android:ems="10"
    android:text="@string/label_host" />

<EditText
    android:id="@+id/et_client_host"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/tv_label_client_host"
    android:ems="10" 
    android:inputType="text"
    android:lines="1" />

<TextView
    android:id="@+id/tv_label_client_port"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/et_client_host"
    android:ems="10"
    android:text="@string/label_port" />

<EditText
    android:id="@+id/et_client_port"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/tv_label_client_port"
    android:ems="10"
    android:inputType="number"
    android:lines="1" />

<ScrollView android:id="@+id/sv_client_in"
    android:layout_width="fill_parent" 
    android:layout_height="match_parent"
    android:layout_above="@+id/tv_label_client_out"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/tv_label_client_in"
    android:background="@drawable/border"
    android:fillViewport="true"
    >

    <TextView
        android:id="@+id/tv_client_in"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:ems="10"
         />

</ScrollView>


<Button
    android:id="@+id/btn_client_send"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:text="@string/btn_send"
    android:onClick="OnBtnSendClick" 
    />

<TextView
    android:id="@+id/tv_label_client_out"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/btn_client_send"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:ems="10"
    android:text="@string/label_client_out" />

<EditText
    android:id="@+id/et_client_out"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_toLeftOf="@+id/btn_client_send"
    android:ems="10" 
    android:inputType="text"
    android:lines="1" />

<Button
    android:id="@+id/btn_client_clear"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/et_client_port"
    android:text="@string/btn_client_clear"
    android:onClick="OnBtnClearClick"
    />

<Button
    android:id="@+id/btn_client_disconnect"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/et_client_port"
    android:text="@string/btn_client_disconnect"
    android:onClick="OnBtnDisconnectClick" 
    />

<Button
    android:id="@+id/btn_client_connect"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/et_client_port"
    android:layout_toLeftOf="@+id/btn_client_disconnect"
    android:text="@string/btn_client_connect"
    android:onClick="OnBtnConnectClick" 
    />

<TextView
    android:id="@+id/tv_label_client_in"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/btn_client_connect"
    android:ems="10"
    android:text="@string/label_client_in"
    />

</RelativeLayout>
  • 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-12T17:14:10+00:00Added an answer on June 12, 2026 at 5:14 pm

    The problem is solved by using LinearLayout.

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

Sidebar

Related Questions

I have a some ui widgets including textview inside RelativeLayout which is clickable. My
Here's a layout: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical> <RelativeLayout android:id=@+id/first_tv_container android:layout_width=fill_parent android:layout_height=wrap_content android:focusable=true android:background=@android:drawable/list_selector_background>
I have a dynamic size RelativeLayout containing TextView with a arbitrary text. Also i
I have a RelativeLayout with a TextView in the middle. I've got it to
Typical search layout having RelativeLayout, TextView, EditText and Button I have a.9.png image having
I have a RelativeLayout defined in an xml layout file named 'myview.xml' which contains
Especially android-developers :) I have some troubles with application menu which i try to
I have RelativeLayout that consists of TextView s that I use to inflate items
I have a RelativeLayout which has a LinearLayout as a child containing TextViews. I
I've created a ScrollView with a RelativeLayout inside of it. I have a TextView

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.