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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:12:41+00:00 2026-06-11T16:12:41+00:00

I have spent hours on this problem, I hope somebody can help me. Sorry

  • 0

I have spent hours on this problem, I hope somebody can help me.
Sorry in advance if the question is stupid, I am fairly new to android development and also, I am using an app builder which has generated already a lot of code. I am basically trying to tweak this code with what I want…

The question is just about xml layouts, I don’t think it involves code. I want to display a simple button at the bottom of this screen.

So I have this screen which builds a group of buttons in a grid. I also display an ad banner at the top. The parameters of these buttons are specified through the web app builder on a web interface. No problem with these buttons. They are displayed correctly in this screen layout below:

    <?xml version="1.0" encoding="UTF-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/containerView"
android:background="@android:color/transparent"    
android:padding="0dip"
android:layout_margin="0dip"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<com.google.ads.AdView android:id="@+id/adView"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     ads:adUnitId="123"
                     ads:adSize="SMART_BANNER"
                     ads:testDevices="123"
                     ads:loadAdOnCreate="true">
</com.google.ads.AdView>



    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/verticalScrollView" 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent">

        <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/tableLayout" 
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent">
        </TableLayout>

    </ScrollView>

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/containerViewHorizontal"
            android:background="@android:color/transparent"    
            android:padding="0dip"
            android:layout_margin="0dip"
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">

            <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/containerViewHorizontalBottom"
                    android:background="@android:color/transparent"    
                    android:padding="0dip"
                    android:layout_margin="0dip"
                    android:orientation="vertical"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">

                <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/horizontalScrollView" 
                    android:layout_width="fill_parent" 
                    android:layout_height="wrap_content">

                    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                        android:id="@+id/containerHorizontalButtons"
                        android:background="@android:color/transparent"    
                        android:padding="0dip"
                        android:layout_margin="0dip"
                        android:orientation="horizontal"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content">

                    </LinearLayout>

                </HorizontalScrollView> 

            </LinearLayout>

    </RelativeLayout>

Now what I am trying to do, is to add at the bottom of this group of buttons, a button that does not belong to the list generated through the web app builder, but manually created:

<Button
android:id="@+id/bmenu2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"     
android:text="Button" />

I have already taken care of the code for this button, it works well, but I don’t manage to display it at the bottom of my screen.

I guess it has to do with the general layout of the screen. I have to admit I am completely lost in the series of layout nested in one another, I don’t understand what is exactly doing what.

If that helps, I have managed to display my button at the top of the screen, even just below my ad banner. But not at the bottom.

Also if that helps, I guess one of the layout takes up the whole heightspace (the scrollview?), living 0 height for the button I want to add…

Thanks a lot for your time and if you can help me!

  • 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-11T16:12:42+00:00Added an answer on June 11, 2026 at 4:12 pm

    Juyt implement a Linear layout instead of a relative one for the list and the button.
    Then give the list a height of 0dp and a weight of 1
    The button will have whatever attributes:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    
    <ListView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" >
    </ListView>
    
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Button" />
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope this is a relatively easy problem although I have spent hours websearching
I have spent hours in this problem and my fellows couldn't help me out.
I'm sorry to ask this question but I have spent hours trying to understand
I have spent hours trying to figure this problem and i just can't, so
I am new in java, I have spent hours for this problem. I will
I'm new to PHP, and have spent 10 hours trying to figure this problem
I hope someone can help me as I've already spent several hours trying to
I have spent hours trying to fix this problem I have, basically I want
I have spent several hours with this SQL problem, which I thought would be
I know this is an old question, but I have spend any hours on

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.