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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:13:23+00:00 2026-05-26T23:13:23+00:00

So my main.xml looks like this: <?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=vertical

  • 0

So my main.xml looks like this:

<?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="vertical" 
android:weightSum="1">


<FrameLayout
    android:id="@+id/headerFrameLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0.15"
    android:background="#597eAA">

    <ImageView
        android:id="@+id/logoImage"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#7ba1d1"
        android:src="@drawable/logo_conekta"/>

</FrameLayout>

<LinearLayout
    android:id="@+id/bodyLinearLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0.7"
    android:background="#f3f3f3"
    android:orientation="horizontal" >

</LinearLayout>

<FrameLayout
    android:id="@+id/footerFrameLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0.15"
    android:background="#597eAA" >
</FrameLayout>

What I was trying to accomplish was to have the screen split up into three: a header and footer of equal height and a body of the remaining.

When I run this code, the headerFrameLayout ends up being the size of the footerFrameLayout+the height of the logoImage. For example: headerFrameLayout=163, logoImage=58, footerFrameLayout=105 and the bodyLinearLayout=493.

I don’t understand why the header also considers the size of the photo. Any ideas?

  • 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-26T23:13:24+00:00Added an answer on May 26, 2026 at 11:13 pm

    It’s not obvious, but that’s just how it works. If you want a 15%, 70%, 15% distribution set each of those elements to have a height of 0dp instead of wrap_content.

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

Sidebar

Related Questions

My main.xml looks 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 >
I have a main activity with this layout file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
What is the below animation supposed to do? <?xml version=1.0 encoding=utf-8?> <rotate xmlns:android=http://schemas.android.com/apk/res/android android:fromDegrees=0
I have main page that looks like this: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html
I have an XML feed that looks like this: <?xml version=1.0 encoding=UTF-8?> <productFeed version=1.0
I am trying to do a listview which looks like this: (source: pici.se )
I declared a WebView activity in the manifest like this: <activity android:name=.MyWebView android:label=@string/app_name android:configChanges=orientation|keyboardHidden
EDIT: It looks like a bug in AIR. I've reported it here: https://bugbase.adobe.com/index.cfm?event=bug&id=2955444 please
I added some UI elements to the main.xml file in the res\layout folder and
I called my main activity Main, and Eclipse created Main.java and res/layout/main.xml for the

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.