FileDocCategorySizeDatePackage
ListItemsExpandOnSelection.javaAPI DocAndroid 5.1 API2476Thu Mar 12 22:22:12 GMT 2015android.widget.listview

ListItemsExpandOnSelection

public class ListItemsExpandOnSelection extends android.util.ListScenario
A list where each item expands by 1.5 when selected.

Fields Summary
Constructors Summary
Methods Summary
public android.view.ViewconvertView(int position, android.view.View convertView, android.view.ViewGroup parent)

        ((ExpandWhenSelectedView)convertView).setText(getValueAtPosition(position));
        return convertView;
    
protected android.view.ViewcreateView(int position, android.view.ViewGroup parent, int desiredHeight)

        TextView result = new ExpandWhenSelectedView(parent.getContext(), desiredHeight);
        result.setHeight(desiredHeight);
        result.setFocusable(mItemsFocusable);
        result.setText(getValueAtPosition(position));
        final AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT);
        result.setLayoutParams(lp);
        return result;
    
protected voidinit(Params params)

        params.setNumItems(10)
                .setItemScreenSizeFactor(1.0/5);