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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:31:38+00:00 2026-05-26T18:31:38+00:00

I have a ListView in Android that I want to split in pages that

  • 0

I have a ListView in Android that I want to split in pages that fit the size of the screen.

This is the code for listview xml:

<?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="match_parent"
android:orientation="horizontal"
android:weightSum="1">

<ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:textFilterEnabled="true"
    android:layout_height="match_parent" >
</ListView>

</LinearLayout>

I know that in order to use ViewFlipper you need to have as much views (ListViews in ths case) as you need inside ‘ViewFlipper /ViewFlipper’ Tags.

Here’s my problem:
My list fills from SQL querys and you can filter it, so the list sometimes have 3 pages, sometimes have 10….

So my question is:
Is there any way to dynamically generate another ListView to use ViewFlipper or… is there any way to modify the xml dinamically and add Listview tags depending on how many pages I need to show?

  • 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-26T18:31:38+00:00Added an answer on May 26, 2026 at 6:31 pm

    A tricky way is to add only one listView to ViewFlipper.
    now reload contents of desired page on flips in same listview . this will give you not only provide you

    showNext()

    and

    showPrevious()

    effects , but also good for memory consumption , because listview itself is very optimized in terms of rendering .

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

Sidebar

Related Questions

I want a filter for my ListView in Android. I have found this link
I have create android listview that fill in using String array. I want to
It seems that android has enforced that a listview must have the name android:id=@android:id/list,
I have an android listview filled with items. Every item has a button. This
http://img804.imageshack.us/img804/9858/howtowrapmiddletext.png Basically I have a listview that is split in three sections. On the
i have a ListView that simly shows items on it. I want to load
I have a an Android ListView that has small (say, 1-5 frame) stutters as
The context: I want to have a ListView that wouldn't receive focus (e.g. won't
I have a Android ListView that has 5 Items. General speaking, if the ListView
I would have listview and a lot of items inside. I want that user

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.