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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:37:23+00:00 2026-05-26T23:37:23+00:00

I am using an expandable listview. The code is as follows and it works

  • 0

I am using an expandable listview. The code is as follows and it works fine. But the problem is in a child of a group I want to put some big information, but it is not showing that. It is just showing 1 line.

public class list1 extends ExpandableListActivity {
private static final String NAME = "name";
   private static final String time = "time";

private static final String IS_EVEN = "IS_EVEN";

private ExpandableListAdapter mAdapter;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    List<Map<String, String>> groupData = new ArrayList<Map<String, String>>();
    List<List<Map<String, String>>> childData = new ArrayList<List<Map<String, String>>>();

        final HashMap<String, String> info1 = new HashMap<String, String>(); 
        info1.put(NAME, "information");
         groupData.add(info1);

        final HashMap<String, String> tt = new HashMap<String, String>(); 
        tt.put(NAME, "time");
        groupData.add(tt);
        final HashMap<String, String> loc = new HashMap<String, String>(); 
        loc.put(NAME, "Location");
        groupData.add(loc);

        List<Map<String, String>> childreninfo = new ArrayList<Map<String, String>>();
        List<Map<String, String>> childrentime = new ArrayList<Map<String, String>>();
        List<Map<String, String>> childrenloc = new ArrayList<Map<String, String>>();

            Map<String, String> infochild = new HashMap<String, String>();
            childreninfo.add(infochild);
            infochild.put(NAME, "asnflabfbalv j;ajf;adf ;j; asjfsap sdjosdjosjdos dosjdosjdosjdos osfjsodfjsofjso osjfosjdfosjf s jsofjsojdsod jdosjdsosod jdsofjsojdfsofd jfosjdfsofjsof odjfsojfsodjosdjsod sojdosjdso djosjdosjds djsodj");

            Map<String, String> timechild = new HashMap<String, String>();
            childrentime.add(timechild);
            timechild.put(NAME, "Childtime " + 1);

            Map<String, String> locchild = new HashMap<String, String>();
            childrenloc.add(locchild);
            locchild.put(NAME, "Childloc " + 1);

        childData.add(childreninfo);
        childData.add(childrentime);
        childData.add(childrenloc);



    // Set up our adapter
    mAdapter = new SimpleExpandableListAdapter(
            this,
            groupData,
            android.R.layout.simple_expandable_list_item_1,
            new String[] { NAME,time },
            new int[] { android.R.id.text1, android.R.id.text2 },
            childData,
            android.R.layout.simple_expandable_list_item_2,
            new String[] { NAME, IS_EVEN }, 
            new int[] { android.R.id.text1, android.R.id.text2 }
            );
    setListAdapter(mAdapter);
  }
}

in this infochild.put(); it is putting very big information, but here it is showing only 1st line of information.

How can I fix this to show all the information?

  • 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-26T23:37:23+00:00Added an answer on May 26, 2026 at 11:37 pm

    This happens because android.R.layout.simple_expandable_list_item_2 defines TwoLineListItem.

    You should provide a simple layout with a single TextView instead:

    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@android:id/text"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        ...
    />
    

    Or you may also try using android.R.layout.simple_expandable_list_item_1.

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

Sidebar

Related Questions

I'm using Expandable List view. In my app both the group and child have
Hi i am displaying items according to different categories using Expandable Listview.Now I want
I am using expandable listview i need to refresh as i am searching the
I have a set of divs that I want to make collapsible/expandable using jQuery's
I am using Eclipse and created HelloWorld and it works fine using emulator. Then
I am not able to remove Group header icon of Expandable listview,can anybody tell
I am using expandable list view with checkboxex. I need to check all child
I have built an expandable tree, using nested UL's. Here is the simplified code
Trying to create collapsible / expandable divs using jQuery, but it's not working for
I have seen in some places that while using Expandable List View we register

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.