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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:58:43+00:00 2026-06-09T19:58:43+00:00

I have screen with ScrollView and three different LinearLayouts . One LinearLayout contains a

  • 0

I have screen with ScrollView and three different LinearLayouts.

One LinearLayout contains a Spinner and second contains ListView and third contains two Buttons ( horizontal ).

I want to display a screen that contains 3 LinearLayouts always displayed at bottom of screen and 1 LinearLayout always displayed on top. In middle part , i want to display ListView content. So that on whole screen there is no blank space present.

I want to create screen for multiple devices which has different sizes.

     <?xml version="1.0" encoding="utf-8"?>
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backrepeat"
android:orientation="vertical" >

<include
    android:id="@+id/include1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    layout="@layout/actionbar" >
</include>

<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scrollbars="horizontal" >

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

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight=".2"
            android:background="@drawable/rounded_border"
            android:orientation="vertical"
            android:padding="15dp" >

            <TextView
                android:id="@+id/tvDiaryData"
                style="@style/greenstyle"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/heading"
                android:gravity="center_horizontal"
                android:text="@string/tvDiaryData" >
            </TextView>

            <TextView
                android:layout_width="fill_parent"
                android:layout_height="10dp"
                android:gravity="center_horizontal" >
            </TextView>

            <Spinner
                android:id="@+id/spDiaryAllBooking"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:prompt="@string/select_diaryallbooking" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1.6"
            android:background="@drawable/layerlist"
            android:orientation="vertical"
            android:paddingBottom="5dp"
            android:paddingLeft="15dp"
            android:paddingRight="15dp"
            android:paddingTop="5dp" >

            <ListView
                android:id="@+id/lvDiaryBooking"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:divider="#636466"
                  android:layout_weight="1"
                android:dividerHeight="1dip"
                android:scrollbarStyle="outsideOverlay"
                android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight=".2"
            android:background="@drawable/rounded_border"
            android:orientation="horizontal"
            android:padding="10dp" >

            <Button
                android:id="@+id/btnDiaryBook"
                style="@style/greenButton"
                  android:layout_weight="1"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"                    
                android:onClick="btnDiaryBook_Click"
                android:text="@string/btnBook" >
            </Button>

            <Button
                android:id="@+id/btnDiaryBalance"
                style="@style/greenButton"
                  android:layout_weight="1"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:layout_marginLeft="10dp"                 
                android:onClick="btnDiaryBalance_Click"
                android:text="@string/btnDiaryBalance" >
            </Button>
        </LinearLayout>
    </LinearLayout>
         </ScrollView>

     </LinearLayout>

Screen Layout with what I want:

enter image description here

Current Layout - This give blank space on below of screen on tablet

  • 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-09T19:58:44+00:00Added an answer on June 9, 2026 at 7:58 pm

    This is a very simple solution. You should be able to use this in your current layout.

    Just populate the LinearLayouts with your desired contents.

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <LinearLayout
            android:id="@+id/ll1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1" >
        </LinearLayout>
    
        <LinearLayout
            android:id="@+id/ll2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1" >
        </LinearLayout>
    
        <LinearLayout
            android:id="@+id/ll3"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1" >
        </LinearLayout>
    
    </LinearLayout>
    

    Screen shot of the code posted above with colors showing the different layout areas.

    enter image description here

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

Sidebar

Related Questions

i have a screen contains just two components 1-textView 2-button the textView starts from
here in above screen, i have two linear layouts, one for two TextView and
I'm completely stumped on this one. I have three different lists that need to
I have a UIscrollview that takes up about half of a screen. The scrollview
I have a screen in my project that contains 3 UIScrollView . These scrollviews
I have 9 screen coordinates, each representing one of 9 positions. From the top
i have a screen and it is i want the buttons to put under
I have a screen with pivot functionality, and I'd very much like just one
I have a screen with two RadioButtonField objects. By default, the first RadioButtonField shows
HI, I have a view that has three UIScrollViews on the screen. I want

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.