FileDocCategorySizeDatePackage
ListHorizontalFocusWithinItemWins.javaAPI DocAndroid 5.1 API2157Thu Mar 12 22:22:12 GMT 2015android.widget.listview

ListHorizontalFocusWithinItemWins

public class ListHorizontalFocusWithinItemWins extends android.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);