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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:37:59+00:00 2026-05-24T10:37:59+00:00

This is probably a stupid question. I know I can wrap a ListView in

  • 0

This is probably a stupid question.

I know I can wrap a ListView in ViewFlipper, but can we wrap individual ListView Items in a ViewFlipper? For instance, the latest Twitter app uses a ListView to display Tweets. It also allows you to set settings on individual items by sliding the tweet out of the way exposing the setting option icons below. Is this a custom implementation or do we have the ability to create something similar using ListView and ViewFlipper? Thanks, any advice is appreciated!


I’ve spent some time on this and got the ListView to display additional content via the ViewFlipper. However, the view only seems to “flip” on the last item in the ListView. How do I get each item to flip when clicked? Here’s some code:

row.xml

<?xml version="1.0" encoding="utf-8"?>
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/flipper" android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TextView android:id="@+id/toptext" android:layout_width="fill_parent"
                android:layout_height="0dip" android:layout_weight="1"
                android:gravity="center_vertical" />
    <TextView android:id="@+id/bottomtext" android:layout_width="fill_parent"
                android:layout_height="0dip" android:layout_weight="1"
                android:gravity="center_vertical" />
</ViewFlipper>

main.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="@id/android:list" android:layout_width="fill_parent"
        android:layout_height="fill_parent" />
</LinearLayout>

ListActivityView.java – extends ListActivity

    ...
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    ...
    }

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        // doesn't matter which line is clicked
        // only the last item in the ListView displays the bottomText
        viewFlipper.showNext(); 
    }

ListingAdapter.java – extends ArrayAdapter

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View v = convertView;

        if (v == null) {
            LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.row, null);

            viewFlipper = (ViewFlipper) v.findViewById(R.id.flipper);
        }
  • 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-24T10:38:00+00:00Added an answer on May 24, 2026 at 10:38 am

    If I am getting your question correct – you can use ViewFlipper inside a layout that defines a row in your list and init it the way you like when rendering corresponding view

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

Sidebar

Related Questions

This is probably a stupid question. I don't know anything about Web Service but
This is probably a stupid question, but I can't seem to do it. I
This is probably a stupid question, but as far as I can tell there's
This is probably a very stupid math question, but i can't seem to figure
I know this is probably a stupid question, but I wanted to make sure
This is probably a stupid question, but how much of a security risk is
This is probably a stupid question, but what exactly is a non-blocking web server?
This is probably a stupid question, but what's the best way to clear class
This is a quick (and probably stupid) question but if I have two consts
This is probably a really stupid MSBuild question but if I have <ItemGroup> <Dll

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.