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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:24:41+00:00 2026-06-08T03:24:41+00:00

In an android 4.1 app I’m designing, I’m trying to get my bottom bar

  • 0

In an android 4.1 app I’m designing, I’m trying to get my bottom bar that has two buttons to be dynamic, a.k.a. not remain stuck to the bottom of the screen even when I am at the top of the page. I want it to appear only when the user scrolls down to the very end of the page. Right now, no matter how much I try, it remains fixed to the bottom of the screen. I’d really appreciate some help.
Thanks.

project_search_list.xml

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

<ListView android:id="@android:id/list"
    android:layout_width="fill_parent" android:layout_height="0dip"
    android:layout_weight="1" android:drawSelectorOnTop="false"
    />

<ImageView
    android:id="@+id/image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:contentDescription="@string/description"
    android:gravity="left"
    android:scaleType="fitXY" />

<TextView
    android:id="@+id/empty"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_gravity="left"
    android:text="" />

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content">

<LinearLayout android:id="@+id/footer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_alignParentBottom="true" style="@android:style/ButtonBar">

<Button android:id="@+id/prev_10_results" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_weight="1"
    android:text="@string/prev_10_results" />

<Button android:id="@+id/next_10_results" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_weight="1"
    android:text="@string/next_10_results" />

</LinearLayout>
</ScrollView>
</LinearLayout>

Here’s a screen capture. Notice the button bar at the bottom? I want it to appear only when I scroll down to the end of the page.

screen shot

  • 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-08T03:24:44+00:00Added an answer on June 8, 2026 at 3:24 am

    This should get you started, check in onscrollstatechanged with row is visible and then take th correct action like toggle or animate the button bar if you use visibility gone the list view will take place on the part where the button bar was before. This way you don’t have empty space at the bottom:

    @Override
    public void onScrollStateChanged(AbsListView view, int scrollState) {
    
        if (scrollState == 0 && mListContent.getLastVisiblePosition() == 0
                && buttonbar.getVisibility() == View.GONE) {
            toggleButtonbar();
        } else if (mListContent.getLastVisiblePosition() != 0
                && buttonbar.getVisibility() == View.VISIBLE) {
            toggleButtonbar();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Android app has a tab bar that uses an Intent to launch the
My android app requires that the device has an SDcard and that SDcard is
My android app has a two word app name, and the 2nd word doesn't
My Android app has two Spinners (dropdown menus) working fine. However, now I've added
My Android app has a button that executes this code in order to open
My Android app has a WebView that requires the Flash plugin. The webview will
My Android app having many buttons. My main.xml layout has three buttons. I know
My Android app has a layout that looks like this: --------------------- | | |
My Android app Transdroid offers several home screen widgets. Every AppWidget has 2 'buttons'
My android app currently has two layouts for its splash screen, portrait and landscape.

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.