Code example for AbsListView.LayoutParams

0
 
    @Override 
    public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
    { 
        TextView textView = new TextView(this.locationsActivity);
        textView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
        textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
        textView.setTextSize(20f);
        textView.setTextColor(Color.WHITE);
        textView.setPadding(60, 20, 0, 20);
        textView.setText(((Node) this.getChild(groupPosition, childPosition)).getNodeName());
        return textView;
    } 
 
    @Override 
    public int getChildrenCount(int groupPosition)
    { 
        return HubController.locationsActivityController.getChildren().get(groupPosition).size();
    } 
 
    @Override