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

ListHorizontalFocusWithinItemWins

public class ListHorizontalFocusWithinItemWins extends com.android.frameworktest.util.ListScenario

Fields Summary
Constructors Summary
Methods Summary
protected android.view.ViewcreateView(int position, android.view.ViewGroup parent, int desiredHeight)

        final Context context = parent.getContext();
        if (position == 0) {
            return ListItemFactory.horizontalButtonSlots(
                    context, desiredHeight, Slot.Left, Slot.Right);
        } else if (position == 1) {
            return ListItemFactory.horizontalButtonSlots(
                    context, desiredHeight, Slot.Middle);
        } else {
            throw new IllegalArgumentException("expecting position 0 or 1");
        }
    
public android.widget.ButtongetBottomMiddleButton()

        return (Button) ((ViewGroup) getListView().getChildAt(1)).getChildAt(1);
    
public android.widget.ButtongetTopLeftButton()

        return (Button) ((ViewGroup) getListView().getChildAt(0)).getChildAt(0);
    
public android.widget.ButtongetTopRightButton()

        return (Button) ((ViewGroup) getListView().getChildAt(0)).getChildAt(2);
    
protected voidinit(Params params)

        params.setItemsFocusable(true)
                .setNumItems(2)
                .setItemScreenSizeFactor(0.2)
                .setMustFillScreen(false);