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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:31:00+00:00 2026-05-23T13:31:00+00:00

<LinearLayout android:orientation=vertical android:layout_margin=10dp android:paddingTop=35dp android:layout_width=200dp android:layout_gravity=center android:layout_height=fill_parent> I want to make it fill 50%

  • 0
   <LinearLayout
    android:orientation="vertical"
    android:layout_margin="10dp"
    android:paddingTop="35dp"
    android:layout_width="200dp"
    android:layout_gravity="center" android:layout_height="fill_parent">

I want to make it fill 50% of the android screen instead of the 200dp

  • 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-23T13:31:01+00:00Added an answer on May 23, 2026 at 1:31 pm

    Wrap your linearlayout in another linearlayout where you’ve set the weightsum to 100.
    Then set the layout_weight of the child linearlayout to 50 and it will take up 50% of the screen.
    Like this:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:weightSum="100">
    
        <LinearLayout android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="50">
    </LinearLayout>
    <LinearLayout android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="50">
    </LinearLayout>
    

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

Sidebar

Related Questions

My scenario is like this: <ScrollView android:layout_width=fill_parent android:layout_height=fill_parent android:scrollbars=vertical android:background=#ffffeb> <LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent
I have a LinearLayout with a vertical orientation, within that layout I have three
I created a user form which fits the window in vertical orientation. When the
Here's my layout code; <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent> <TextView android:text=@string/welcome
I have a simple LinearLayout with one TextView and one ImageView. I want the
Android empty list layout Whatever I do, I can't get the empty tag to
I want to use precise layout on Nexus One, my code is like this:
I want to make a layout similar to this one: www.ImageBanana.net - layout.png http://www.imagebanana.com/img/9kmlhy66/thumb/layout.png
I'm trying to run the Android MapView example, and am getting a 'Cannot cast
I'm just starting with Android and can't find how to display a list in

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.