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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:16:57+00:00 2026-05-27T14:16:57+00:00

I am trying to display the accelerometer data in 3 rows like this: X:

  • 0

I am trying to display the accelerometer data in 3 rows like this:

X: 9.8 m/s2
Y: 0.0 m/s2
Z: -3.2 m/s2

But no matter what I have tried, I cannot seem to prevent the m/s2 from shifting back and forth when one of the values goes above 9.9 or negative.

E.g.

Before
X: 0.0 m/s2

After
X: -5.0 m/s2

I have tried tablelayout but the column just stretches, relativelayout, linearlayout and every possible padding combination I can think of.

Here’s a sample of my XML code which is inside of a vertical linear layout.

<LinearLayout           
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="X:"
    android:textSize="30sp" />
    <TextView
        android:id="@+id/x_value"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
        android:paddingLeft="30sp"
        android:paddingRight="30sp"
        android:text="        "
        android:textSize="30sp"/>
<TextView
        android:id="@+id/xAccelUnits"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="           "
        android:textSize="30sp" />
</LinearLayout>

Thanks for your help!

  • 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-27T14:16:58+00:00Added an answer on May 27, 2026 at 2:16 pm

    you need to fix the size of the text view. It can be either a width in dp : layout_width=”30dp”

    or you can use weights: layout_width=”0dp” layout_weight=”1″ for each TextView so that each takes a third of the screen (by modifying the weight and the weight_sum in the linear layout, you can give the width in fractions of the screen width)

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

Sidebar

Related Questions

I've been trying to display text using a Quartz context, but no matter what
Im trying to display the image i have coming from an intent.putExtra on a
Im trying to display this listview, but I keep getting a: 07-17 21:14:22.233: ERROR/AndroidRuntime(349):
Trying to display related data from a hasMany through table. It's finding the joinModel
im trying to display data on the footer in jqgrid, but it only displays
I'm trying to display images from android internal storage, I have only 4images(the images
Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
When trying to display a byte stream from HLDS (Half-Life Dedicated Server) in a
I'm trying to display a series of titles varying from 60 characters to 160
I have an array of Person pocos, populated below. I'm trying display them alphabetically

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.