Note that there are some explanatory texts on larger screens.

plurals
  1. POExpandedList view not works properly in android
    text
    copied!<p>I have fetch Comments via Json parsing in Facebook and i create Expanded list view to see all comments of the post but it cant expand in layout. please help me to fix this. this is my XML layout</p> <pre><code> &lt;ExpandableListView android:id="@+id/expandableListView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:groupIndicator="@null"&gt; &lt;/ExpandableListView&gt; </code></pre> <p></p> <p>And my code</p> <pre><code>public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { int s=ConstantsValues.commentsResponse.get(position).size(); View view=convertView; LayoutInflater inflater =(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view=inflater.inflate(R.layout.custom_expandablecomments_parentgroup, parent,false); TextView tv1=(TextView)view.findViewById(R.id.textView_GROUP); tv1.setText("Click hee to see " +s+" comments"); tv1.setPadding(100, 0, 0,0); return view; } public View getChildView(int groupPosition, int childPosition,boolean isLastChild, View convertView, ViewGroup parent) { HashMap&lt;String, Object&gt; hashmap= ConstantsValues.commentsResponse.get(groupPosition).get(childPosition); View view=convertView; position=childPosition; LayoutInflater inflater =(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view=inflater.inflate(R.layout.custom_expandable_comments, parent,false); ImageView imv=(ImageView)view.findViewById(R.id.Imageview_profipic_commentsShow); TextView tv1=(TextView)view.findViewById(R.id.textView_Name_CommentShow); TextView tv2=(TextView)view.findViewById(R.id.textView_Comments_show); imv.setImageBitmap((Bitmap)hashmap.get("Image")); tv1.setText((String)hashmap.get("UserName")); tv2.setText((String)hashmap.get("CommentsFull")); return view; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload