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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:59:24+00:00 2026-06-09T03:59:24+00:00

In my application I am showing list of datas from database in a list

  • 0

In my application I am showing list of datas from database in a list view.For that listview i have 1 header with 4 text views arranged horizontally..But i want this to be arranged with some space exactly between and also it should fit into every screen. Please help me.Thanks in advance.By the following code it is arranging 1 after the other without space.

My code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" 
    android:background="#ffffffff">

     <TextView android:id="@+id/hdrdate"        
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"        
        android:text="Date"/> 

      <TextView android:id="@+id/hdrdateasc"        
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"           
        />

     <TextView android:id="@+id/hdrdes"     
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"        
        android:text="Item"
        />

     <TextView android:id="@+id/hdritemasc"     
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        />

      <TextView android:id="@+id/hdrprice"      
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"        
        android:text="Price"
        />      

       <TextView android:id="@+id/hdrpriceasc"      
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#000000"
        />

      <TextView android:id="@+id/hdrtot"        
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"        
        android:text="Total"
        />

       <TextView android:id="@+id/hdrtotasc"        
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#000000"
        />
</LinearLayout>
  • 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-09T03:59:27+00:00Added an answer on June 9, 2026 at 3:59 am

    You can use layout margin for spacing between view like

    android:layout_marginLeft="5dp"
    android:layout_marginRight="5dp"
    

    To fit them on the screen you can use layout_weight.Give every view weight 1 so all will be equal.You already use fill_parent for the width of your LinearLayout.

    android:layout_weight="1" for every view

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

Sidebar

Related Questions

i have created a single page application of showing phonebook data in a list.
I have an application that displays videos. The code below gets a list of
I have a silverlight mvvm application that loads main view with 2 user controls
I'm writing a vertical scrollable calendar application(listview) that is always showing 1 month at
In a MVC application, I have a view showing tasks. The tasks should be
I have an application showing a WebView which shows information that includes street addresses
I have to include one report in my application showing offline/online activity of few
I need to add a textbox in my application that starts showing with the
I am showing a map view on front page of my application, I set
Background I have a ror application which is continuously recording and showing on a

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.