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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:18:20+00:00 2026-06-06T04:18:20+00:00

If i have a expandablelistview with custom layout (group.xml and child.xml), the are any

  • 0

If i have a expandablelistview with custom layout (group.xml and child.xml), the are any way to set a 9.png background for all the row(group + child? if is expand, only row if collapse).

For example i have 4 groups

1row collapsed with background
2row collapsed with backgound
3row expand
  group   <---- I want to use 1 background for group.xml and child.xml, this is it, the group background expands to be background for child too
  child
5row collapsed with backgruond

Or, when i use expandablelistview, and define a row.xml background, when i expand a groupo, the background envolpes too to the child?

  • 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-06T04:18:22+00:00Added an answer on June 6, 2026 at 4:18 am

    I am afraid this is not possible. Since you are referring to two different resource files in a ExpandableList, you can’t group them as a single view. Being this the case, you can set the 9 patch to your total expandable listview which you might not want as your need. So here goes the round about method.

    1)You can have three set of images. Once full closed image. second image can look like the top half of the first image and third image to look like the bottom half of the first image.

    2)Add the listener on GroupExapnded() to your ExpandableListView. Now this will return you the position of the view, boolean flag of the view state(whether it is expanded or collapsed) and and the object to that view.

    3)Now based on the boolean flag you have to play around with the images as of which image is to be as the background.

    There will be two scenarios,

    1)For the expanded state, you have to apply the second image to the group and the third image to the child.

    2)If the group is collapsed , you have to apply the first image as the background to the Group View.

    This is the most ugliest way which I know by myself. if you can get any better solution kindly inform me to.

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

Sidebar

Related Questions

I have a ExpandableListView in which i am loading custom layouts in both group
I have an ExpandableListView backed by a BaseExpandableListAdapter. The child list items are all
I am trying to use a custom ExpandableListView with parent and child layout with
I have problem in this layout that : it doesn't show any child after
I have an expandablelistview with a checkbox by group and a checkbox by child.
i have a custom expandable listview, and in the child of listview i have
can we have ExpandableListView inside ListView so that I can have group level first
I have a problem with an ExpandableListView in my Android application. I've set a
I have an expandablelistview and I have put a background for the groups item,
ok so I have an ExpandableListView, I have defined all my views and everything

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.