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

The Archive Base Latest Questions

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

I have layout included inside another layout , I want this included one aligned

  • 0

I have layout included inside another layout , I want this included one aligned bottom when I include it

<?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">

<Button 
        android:text="Enter Piano course" 
        android:id="@+id/btnEnterCourse" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"></Button>

<include 
                layout="@layout/powered_by_bar"></include>
</LinearLayout>

in this code sample I want to align powered_by_bar to the bottom of the interface

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

    In a vertical LinearLayout you cannot align at bottom (or at top) but left or right. In horizontal LinearLayout you can align bottom and top but not left or right.

    To do that you have to wrap the inner LinearLayout in a horizontal LinearLayout and set the layout_weight and layout_gravity correctly:

        <?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">
    
                <Button android:text="Enter Piano course" 
                        android:id="@+id/btnEnterCourse" 
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"></Button>
    
                <LinearLayout android:layout_weight="1" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" >
                        <LinearLayout android:background="#0000ff" android:layout_gravity="bottom" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="30dip" />
                </LinearLayout>
        </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following layout buttons.xml <?xml version=1.0 encoding=UTF-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/buttonsLayout android:layout_width=fill_parent android:layout_height=wrap_content
I have a layout that is working, but it has one very annoying problem..
I have a layout similar to this: <div id=...><img src=...></div> and would like to
I have a layout in which I am displaying a webview . I want
I have a layout defined in XML. It contains also: <RelativeLayout android:id=@+id/item android:layout_width=fill_parent android:layout_height=wrap_content
I have a layout 'profile' <div> <div> $this->action(action1, controller1, module1)<div> <div> $this->layout()->content </div> <div>
I have this layout that works correctly, a relative layout with a text view
I have an activity using an xml layout where a WebView is embedded. I
I have a layout xml file named my_layout.xml, in which the root view's layout_width
I have a UITextView included in a UITableViewCell. The layout is correct when 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.