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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:18:05+00:00 2026-05-28T06:18:05+00:00

I am trying to ‘float’ a RelativeLayout to the bottom of a Window ,

  • 0

I am trying to ‘float’ a RelativeLayout to the bottom of a Window, and have the following layout:

<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
    <com.my.activity.CanvasView
    android:id="@+id/canvas"
    android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:focusable="true" />
    <RelativeLayout
        android:id="@+id/toolbar_notification"
        android:layout_width="match_parent"
        android:layout_height="35dp"
        android:layout_alignParentBottom="true"
        android:gravity="bottom|center_vertical">
        <ImageView
            android:id="@+id/toolbar_notification_icon"
            android:layout_width="40dp"
            android:layout_height="match_parent"
            android:layout_alignParentBottom="true"
            android:layout_alignParentTop="true"
            android:layout_alignParentRight="true"
            android:contentDescription="@string/content_desc_save_icon"
            android:gravity="center|center_vertical" />
    </RelativeLayout>
</merge>

Unfortunately, the toolbar_notification RelativeLayout is not being bottom-aligned. Replacing the merge tag with a FrameLayout tag results in the desired effect, but in the name of efficiency I’d like to remove that if possible.

Anyone seen this issue, or have any suggestions? Is the fact that the merge element is not a ‘parent’ in the true sense resulting in the toolbar_notification element being unable to place itself?

  • 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-28T06:18:06+00:00Added an answer on May 28, 2026 at 6:18 am

    android:gravity="bottom|center_vertical" is referred to children of RelativeLayout and not to RelativeLayout itself.

    If you want to align RelativeLayout to the bottom of the parent (that is a FrameLayout) you have to use layout_gravity instead.

    ...
    <RelativeLayout
            android:id="@+id/toolbar_notification"
            android:layout_width="match_parent"
            android:layout_height="35dp"
            android:layout_alignParentBottom="true"
            android:layout_gravity="bottom|center_vertical">
     ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to get comfortable with jQuery and I have encountered some sample code that
Trying to write a windows speech recognition macro. Written using XML and scripting language
I am trying to create a RegEx expression that will successfully parse the following
Trying to display a new page, in a new window when the user clicks
Trying to use LayerDrawable (defined in XML as layer-list) to layer several shape drawables
Trying to construct a query such that I have multiple statement specifying joins, each
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
Trying to figure out how to do this. I have the style but I'd
Trying to run the following: JS: $('#my-modal').modal(); markup: <img src=\Images\Browser\file_types\d8d74cae-2186-42ad-a932-3aa4b75e0f12.png title=name: a3 onclick=Attachment_onClick( bfa9ec7e-d781-4523-a4ee-dd587f699c18)=

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.