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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:53:04+00:00 2026-06-09T02:53:04+00:00

I want to make a custom TableRow for my android application. I started from

  • 0

I want to make a custom TableRow for my android application. I started from the LinearLayout which is exactly what I want to display but as a TableRow in a TableLayout.

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="10dp" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingBottom="3dp"
        android:paddingTop="3dp"
        android:weightSum="1" >

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.7"
            android:text="@string/Context" />

        <TextView
            android:id="@+id/ContextTextView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.3" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingBottom="3dp"
        android:paddingTop="3dp"
        android:weightSum="1" >

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.7"
            android:text="@string/SHUId" />

        <TextView
            android:id="@+id/SHUIdTextView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.3" />
    </LinearLayout>

    ...Others LinearLayouts with 2 TextViews...

</LinearLayout>

So first I tried to put this code inside a TableRow element :

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

    ...LinearLayout code from above...

<TableRow />

At this point the layout is displayed properly in the eclipse editor BUT now I have a Lint warning on the main LinearLayout : “This LinearLayout layout or its TableRow parent is
useless”

Then I’d say OK TableRow is a subclass of LinearLayout then I could simply remove the main LinearLayout and put his properties directly on the TableRow just like this :

<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="10dp" >

    <LinearLayout >
        <TextView />
        <TextView />
    <LinearLayout />

    <LinearLayout >
        <TextView />
        <TextView />
    <LinearLayout />

    ...etc...

<TableRow /> 

But now the layout is not correctly displayed anymore (but no warning). I see only the first line (with the 2 first TextView).
What am I missing?

  • 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-09T02:53:05+00:00Added an answer on June 9, 2026 at 2:53 am

    Is your TableRow a child of TableLayout? If not you shouldn’t be using TableRow – without TableLayout it’s just a horizontal LinearLayout.

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

Sidebar

Related Questions

I want to make a custom listview with 1000+ songs. But in my application,
I want to make a custom Form but I don't know which class to
I want to make custom select from the database table using Linq. We use
I want to route from controller to custom route I make a custom route
I want make a bash script which returns the position of an element from
I want to make a custom mp3 player in flash which can play 2
I want to make a custom DataGridView, which can give the user a tip
I want to make custom search This is the output url from the form
I want to make a custom element with text taken from the element being
I've made a custom spinner but the sizing isn't exactly what I want it

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.