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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:01:42+00:00 2026-06-18T00:01:42+00:00

well i´m trying to create a ExpandableListView like Spotify it does… But i don´t

  • 0

well i´m trying to create a ExpandableListView like Spotify it does… But i don´t have any idea how do disable the LinearLayout to act like a button (Expand the list) I have created a image which should describe what i like. I like to have the possibility to handle a click on the text / image (parent) as a normal interaction. A click on the right button should expand the list like in Spotify…

First picture show the expand action (now), second show the expand action how it should be...

  • 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-18T00:01:43+00:00Added an answer on June 18, 2026 at 12:01 am

    This is the onCreate from the ChannelList which extends ListFragment. It stores the data and generate a new Adapter if the Fragment is called.

    @Override   
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
    {                               
        m_ListView = new ExpandableListView(getActivity());
        m_ListView.setId(android.R.id.list);
    
        m_ListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
        m_ListView.setMultiChoiceModeListener(m_MultiChoiceModeListener);
    
        m_ChannelListAdapter = new ChannelListAdapter(getActivity(), this);
        m_ListView.setAdapter(m_ChannelListAdapter);
        m_ListView.setGroupIndicator(null);
        m_ListView.setOnGroupClickListener(this);
    
        return m_ListView;
    }
    

    On the Adapter i have the getGroupView Method which look like:

    public View getGroupView(int i, boolean b, View view, ViewGroup viewGroup) {
    
        if (view == null) 
        {
            view = inflater.inflate(R.layout.layout_channelwithimage, viewGroup, false);
        }
    
        TextView textView = (TextView) view.findViewById(R.id.labelwithimage);
        textView.setText(getGroup(i).toString());
    
        ImageButton imbu = (ImageButton) view.findViewById(R.id.imageButton);
        //imbu.setOnClickListener(this);    
        imbu.setFocusable(false);
    
        return view;
    }
    

    So if i register the ImageButton in the adapter it will call the onClick from the adapter. But in the onClick i do not know which group was clicked… If i do not register the button on any listener it will not call the onGroupClick from the ChannelList…

    • 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 chained constructors but well, im no good at it
I'm trying to create a filter / tagging system. This answer works well but
I edited some mistakes and details... Well, I have been trying to create a
I'm trying to create a program that, well, looks something like this: self.b1 =
Alright well I am trying to create a dictionary from a text file so
I am trying to create my own little MVC system, its working very well,
Well im trying to write my own custom control extender but i can't get
Well I am trying to learn the java MVC pattern, but I can't understand
Well im trying to create a custom container class that contains in my case
Am trying to create a well-optimised bit of code to create number of X-digits

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.