FileDocCategorySizeDatePackage
ListInterleaveFocusables.javaAPI DocAndroid 5.1 API1876Thu Mar 12 22:22:12 GMT 2015android.widget.listview

ListInterleaveFocusables

public class ListInterleaveFocusables extends android.util.ListScenario
List that interleaves focusable items.

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

        if (mFocusablePositions.contains(position)) {
            return ListItemFactory.button(
                    position, parent.getContext(), getValueAtPosition(position), desiredHeight);
        } else {
            return super.createView(position, parent, desiredHeight);
        }
    
public intgetItemViewType(int position)

        return mFocusablePositions.contains(position) ? 0 : 1;
    
public intgetViewTypeCount()

        return 2;
    
protected voidinit(Params params)


    
        
        params.setNumItems(7)
                .setItemScreenSizeFactor(1.0 / 8)
                .setItemsFocusable(true)
                .setMustFillScreen(false);