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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:01:05+00:00 2026-06-12T00:01:05+00:00

So I am creating an android app to communicate with arduino over serial. It

  • 0

So I am creating an android app to communicate with arduino over serial. It is going quite well, but I am having some problems with the layout. My TextView is overlapping on both the top and bottom, and I have no idea why!

https://www.dropbox.com/s/jaz8vbx63kd25ix/Screenshot_2012-09-27-18-53-24.png

Here is my main.xml:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginBottom="20dp" >

    <TextView
        android:id="@+id/demoTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <ScrollView
        android:id="@+id/demoScroller"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <TextView
            android:id="@+id/demoText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:typeface="monospace" />

    </ScrollView>

    <RelativeLayout
        android:id="@+id/send"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        >

    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_toLeftOf="@+id/sendButton"

        android:ems="10"
        android:hint="@string/send_text"
        android:inputType="text"
        android:singleLine="true" >
     </EditText>

    <Button
        android:id="@+id/sendButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:text="Button" />

    </RelativeLayout>

</FrameLayout>

Thanks in advance.

  • 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-12T00:01:06+00:00Added an answer on June 12, 2026 at 12:01 am

    It’s likely because you’re using a FrameLayout, which “should be used to hold a single child view, because it can be difficult to organize child views in a way that’s scalable to different screen sizes without the children overlapping each other“. Try using a LinearLayout with a vertical orientation.

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="20dp"
        android:orientation="vertical" >
    
        <TextView
        android:id="@+id/demoTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />
    
        <!-- ... -->
    
        </RelativeLayout>
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an Android app which must do some web surfing in the background
I am creating an app on android but after hearing about sencha that it
I'm creating an Android app utilising OpenGL ES, and need some help with the
I'm creating android app that has table layout for the main activity, and that
I'm creating an android app where user loads some data from an online server
I'm creating an android app that will have multiple pages with the same layout,
So I'm creating an Android app that uses Unity ... I am getting some
I am creating an Android app that uses Twitter4J to read some user info.
I am creating an android app in eclipse and for some reason the .AgainActivity
I am creating an android app myself (min sdk version 7 or 2.1 and

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.