FileDocCategorySizeDatePackage
ListItemsExpandOnSelection.javaAPI DocAndroid 1.5 API2504Wed May 06 22:42:02 BST 2009com.android.frameworktest.listview

ListItemsExpandOnSelection

public class ListItemsExpandOnSelection extends com.android.frameworktest.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.FILL_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT);
        result.setLayoutParams(lp);
        return result;
    
protected voidinit(Params params)

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