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

  • Home
  • SEARCH
  • 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 8453873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:52:28+00:00 2026-06-10T11:52:28+00:00

I have 2 buttons and 2 textviews (1button and 1textview in one line, samething

  • 0

I have 2 buttons and 2 textviews (1button and 1textview in one line, samething in the line below it) then i try to make all of them in the same line but when i run the app it forces to close.
XML Layout code:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:ignore="HardcodedText" >

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_marginLeft="22dp"
    android:layout_marginTop="46dp"
    android:text="Mensagem:" />

<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:text="Destinatario:"
    android:textSize="22dp" />

<Spinner
    android:id="@+id/spinner1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true" />

<EditText
    android:id="@+id/etMsg"
    android:layout_width="fill_parent"
    android:layout_height="150dp"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/textView2"
    android:ems="10"
    android:inputType="textMultiLine" />

<Button
    android:id="@+id/bEnviar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:text="ENVIAR" />

<Button
    android:id="@+id/bData"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/etMsg"
    android:layout_marginTop="66dp"
    android:text="Data" />

<TextView
    android:id="@+id/tvData"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/bData"
    android:layout_alignBottom="@+id/bData"
    android:layout_alignRight="@+id/textView1"
    android:text="data" />

<Button
    android:id="@+id/bHora"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/tvData"
    android:layout_alignBottom="@+id/tvData"
    android:layout_marginRight="24dp"
    android:layout_toLeftOf="@+id/spinner1"
    android:text="Hora" />

<TextView
    android:id="@+id/tvHora"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/bHora"
    android:layout_alignBottom="@+id/bHora"
    android:layout_alignLeft="@+id/spinner1"
    android:text="hora" />

  • 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-10T11:52:30+00:00Added an answer on June 10, 2026 at 11:52 am

    Sometimes, when you change something in a Layout, the generated R class is not updated correctly. This has caused the described errors several time for me. Try to clean your project so everything is compiled/generated anew, and hopefully the error goes away.

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

Sidebar

Related Questions

I want to have Buttons next to each other on the same line, and
i have an activity with buttons, textviews, and so on. all i want is
I have five buttons on one form that when clicked enables a bool each
I have a listactivity where I read/set diferent controls such as textviews, buttons or
how to i make a object of views buttons textviews globally accessible in the
I have list view which contains 2 buttons and 2 textviews. I change the
I have created linearlayout with layout:height=fill_parent I have set 3 buttons and one TextView.
I have 7 activites all with back and forth navigation buttons between the rest;
Is there a way to format all TextViews, Buttons or whatever with a theme
I need to use same widgets(buttons,editext,textviews) with same properties like width,height,textColor,size etc in multiple

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.