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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:35:04+00:00 2026-05-24T01:35:04+00:00

I have a LinearLayhout that contains a listView and below it an ImageButton .

  • 0

I have a LinearLayhout that contains a listView and below it an ImageButton.
When I add items to the list, the imageButton is moving lower and lower, which is what I want but when there are many elements in the list so that is the list is big enough to fill the screen, I can scroll down to the bottom of the list, but no further, meaning I can’t see the imageButton anymore.

Code:

<LinearLayout  
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/add_interest_layout_root"
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:background="@color/back" 
     android:layout_height="match_parent">

     <ListView android:id="@android:id/list" 
           android:layout_width="match_parent"
           android:divider="@drawable/downa"
           android:footerDividersEnabled="false"
           android:cacheColorHint="@android:color/transparent"
           android:layout_gravity="center"
           android:layout_marginTop="6dp" 
           android:layout_height="wrap_content">
     </ListView>
<LinearLayout 
    android:layout_height="wrap_content" 
    android:layout_width="match_parent" 
    android:id="@+id/linearLayout2"
    android:gravity="center">
    <LinearLayout 
        android:orientation="vertical" 
        android:gravity="center_horizontal" 
        android:layout_height="wrap_content" 
        android:layout_width="wrap_content" 
        android:id="@+id/LinearLayout16">
        <ImageButton          
              android:src="@drawable/add" 
              android:id="@+id/btn_interest_more" 
              android:layout_height="wrap_content" 
              android:layout_width="wrap_content" 
              android:layout_gravity="center_horizontal" 
              android:background="@android:color/transparent"></ImageButton>
        <TextView 
              android:layout_height="wrap_content" 
              android:textColor="@android:color/white" 
              android:textAppearance="?android:attr/textAppearanceSmall" 
              android:layout_width="wrap_content" 
              android:id="@+id/TextView08"                
              android:text="be more\nspecific"   
              android:gravity="center"></TextView>
    </LinearLayout>
</LinearLayout>

What am I doing wrong? I want to be able to see the ImageButton even when I scroll down.

  • 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-24T01:35:05+00:00Added an answer on May 24, 2026 at 1:35 am

    You should do something like this. Mind you this is a pseudo code so you better fill the correct attributes.

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/add_interest_layout_root"
     android:layout_width="match_parent"
     android:background="@color/back" android:layout_height="match_parent">
    
          <LinearLayout android:layout_height="wrap_content"
              android:layout_width="match_parent" android:id="@+id/linearLayout2"
              android:gravity="center" android:layout_alignParentBottom="true">
              <!-- LinearLayout elements same as above -->
          </LinearLayout>
    
          <ListView android:id="@android:id/list" 
              android:layout_above="@+id/linearLayout2"
              android:layout_width="match_parent"
              android:divider="@drawable/downa"
              android:footerDividersEnabled="false"
              android:cacheColorHint="@android:color/transparent"
              android:layout_gravity="center"
              android:layout_marginTop="6dp" android:layout_height="match_parent">
          </ListView>
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a LinearLayout view that already contains several elements. I want to add
I have a header for a list that contains two image buttons. I want
I have a Custom ListView that contains a vertical LinearLayout of horizontal LinearLayouts for
I have a linear layout that contains 6 images, which span the linear layout
I have a RelativeLayout that contains a WebView and a ListView (ListViewContainer is a
So I have a custom ListView object. The list items have two textviews stacked
I have a LinearLayout that contains sublayouts which essentially mimick a 3x2 grid. Each
I have a ListView which contains an ImageView and a TextView. I'm subclassing ArrayAdapter
I have a custom list view which contains two text views and on button.
I have a main menu screen with a simple ListView that contains links to

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.