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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:36:12+00:00 2026-06-06T04:36:12+00:00

Ive been trying unsuccessfully for a few days now to get a button to

  • 0

Ive been trying unsuccessfully for a few days now to get a button to sit at the bottom of a gridview, I have still not been able to get the to work and havent been able to find a working solution anywhere, has anyone done this before? below is my code and an example of what Im trying to achieve, any help would go an extremely long way, thank you so much if you can give me an answer that actually works.

<?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="wrap_content"
android:orientation="vertical" >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:orientation="horizontal" >

    <ImageView
        android:id="@+id/profile_user_avatar"
        android:layout_width="48px"
        android:layout_height="48px"
        android:layout_marginTop="5dp"
        android:adjustViewBounds="true" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingLeft="5dp" >

        <TextView
            android:id="@+id/profile_realname"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:textSize="20dp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/profile_username"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="2dp"
            android:gravity="left" />
    </LinearLayout>
</LinearLayout>

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:layout_weight="1"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tweets_stat"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/button_color_light"
            android:gravity="center"
            android:padding="10dp"
            android:textColor="#FFFFFF"
            android:textSize="20dp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/button_color_dark"
            android:gravity="center"
            android:padding="10dp"
            android:text="Tweets"
            android:textColor="#FFFFFF"
            android:textSize="15dp"
            android:textStyle="bold" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:layout_weight="1"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/followers_stat"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/button_color_light"
            android:gravity="center"
            android:padding="10dp"
            android:textColor="#FFFFFF"
            android:textSize="20dp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/button_color_dark"
            android:gravity="center"
            android:padding="10dp"
            android:text="Followers"
            android:textColor="#FFFFFF"
            android:textSize="15dp"
            android:textStyle="bold" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:layout_weight="1"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/following_stat"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/button_color_light"
            android:gravity="center"
            android:padding="10dp"
            android:textColor="#FFFFFF"
            android:textSize="20dp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/button_color_dark"
            android:gravity="center"
            android:padding="10dp"
            android:text="Following"
            android:textColor="#FFFFFF"
            android:textSize="15dp"
            android:textStyle="bold" />
    </LinearLayout>
</LinearLayout>

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >

    <GridView
        android:id="@+id/gridView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:columnWidth="90dp"
        android:gravity="center"
        android:horizontalSpacing="10dp"
        android:numColumns="auto_fit"
        android:stretchMode="columnWidth"
        android:verticalSpacing="10dp" >
    </GridView>

    <Button
        android:id="@+id/profile_button"
        style="@style/TextAppearance.Button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/gridView1"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/button_background"
        android:text="Load more photos" />
</RelativeLayout>

</LinearLayout>

enter image description here

  • 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-06T04:36:13+00:00Added an answer on June 6, 2026 at 4:36 am

    Try to use this:

    <RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >
    
    <Button
        android:id="@+id/profile_button"
        style="@style/TextAppearance.Button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/button_background"
        android:text="Load more photos" />
    
    <GridView
        android:id="@+id/gridView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/profile_button"
        android:layout_alignParentTop="true"
        android:columnWidth="90dp"
        android:gravity="center"
        android:horizontalSpacing="10dp"
        android:numColumns="auto_fit"
        android:stretchMode="columnWidth"
        android:verticalSpacing="10dp" >
    </GridView>
    

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

Sidebar

Related Questions

Ive been trying to get this to work for 3 days now. I cant
I've been trying for days now to send mail from Grails application and unsuccessfully.
I've been trying unsuccessfully to filter a collection of child objects for a few
I've been trying for some time now to get xml parser working leak free
I have been trying to use a C# Regex unsuccessfully to remove certain strings
I've been unsuccessfully trying to get a class from a .jar file. The .jar
I've been unsuccessfully trying to bind a gridview through a web service, but nothing's
I have been trying to setup git for our web development team unsuccessfully. Some
Ive been trying to sort out output using AWK, and have been pretty successful
I've been trying (unsuccessfully) to use Em.Button to trigger an action on my controller

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.