TextView txt=new TextView(productlist.this);
txt.setText(author.get(groupPosition));
TextView txt1=new TextView(productlist.this);
txt1.setText(price.get(groupPosition));
txt.setLayoutParams(new LayoutParams(70, LayoutParams.WRAP_CONTENT));
txt1.setLayoutParams(new LayoutParams(70,LayoutParams.WRAP_CONTENT));
LinearLayout ll=new LinearLayout(productlist.this);
ll.setOrientation(LinearLayout.HORIZONTAL);
ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
// ll.setGravity(Gravity.CENTER);
ll.addView(txt);
ll.addView(txt1);
return ll;
Hallo, dies ist der Codeschnipsel für eine Gruppenansicht in erweiterbar ListView
was zu einem Fehler führt:
java.lang.ClassCastException Android.view.viewgroup.$layoutParam