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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:12:03+00:00 2026-06-08T12:12:03+00:00

I am trying to create something like (very poorly created in paint) in the

  • 0

I am trying to create something like (very poorly created in paint) in the image below:
what i want

I have only 4 items, and it won’t be more. the items contains two textviews. But when you click on an item, i want it to expand, (like item 2) to the bottom with three extra buttons. It would be really nice if there would be some nice expand animation. I don’t want this list to be scrollabe, it just need to fits in my screen. And only one can be expanded.

I think there are two options, but maybe i am missing something.
1) Create an itemlayout.xml, containing an linearlayout or something containing the extra buttons, set to linearlayoutbuttoncontainer.setvisibility(View.GONE). And then build a switch, which closes the others than the clicked one, and set the visibility of the clicked item to visible. This would be fairly easy to build i guess, i don’t foresee a lot of problems. But is it possible creating an animation or is there only a sudden screen change?

2) expandable listview, with the buttons in the expandable item. I know its possible to make only one item expanded, by rembering the expanded one and closing it again. But is it possible to make it like this, with the buttons in the expandable part? Actually i’ve never used an expandable view.

Anyone know what the best solution should be?
Thanks

  • 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-08T12:12:04+00:00Added an answer on June 8, 2026 at 12:12 pm

    I would recommend using an expandable list view for this, as your second option described. For this type of list you can use a expandable listview adapter, describded here:

    http://developer.android.com/reference/android/widget/ExpandableListAdapter.html

    This adapter has both a getGroupView(open/close items) and a getChildView method in which you can inflate your layouts, or manually set them up. If you have used ordinary listviews I’m sure this wont be a problem for you, since it’s basically the same operations.

    This means you should probably inflate your childViews with a LinearLayout containing three buttons. Then you have to implement functionality for your collapse/expand logics by keeping track of which item index is opened.

    I did this tutorial when I first started out with exp.list views, I found it helpful:

    http://android-adda.blogspot.se/2011/06/custom-expandable-listview.html

    Good luck!

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

Sidebar

Related Questions

I am trying to create something like this as i have done it in
I'm trying to create something that works like this but doesn't have any submenus.
I am trying to create something like this: But I have problems beacuse it
I am trying to create something in Perl that is basically like the Unix
I'm trying to create a jQuery selector that will do something like this: (.a
I am trying to create an array which will follow something like this array(
i'm trying to create a Dynamic Sub-menu to use it in Wordpress, Something like
My httpd-vhosts.conf file looks something like this. I am trying to create 2 virtual
I'm trying to create a animation by scrolling the page, something like this: $(function()
I'm trying to do something like: <Create a CAAnimationGroup aGroup with removedOnCompletion = NO

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.