FileDocCategorySizeDatePackage
PanelHolder.javaAPI DocAndroid 5.1 API2548Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.phone

PanelHolder

public class PanelHolder extends android.widget.FrameLayout

Fields Summary
public static final boolean
DEBUG_GESTURES
private int
mSelectedPanelIndex
private PanelBar
mBar
Constructors Summary
public PanelHolder(android.content.Context context, android.util.AttributeSet attrs)


         
        super(context, attrs);
        setChildrenDrawingOrderEnabled(true);
    
Methods Summary
protected intgetChildDrawingOrder(int childCount, int i)

        if (mSelectedPanelIndex == -1) {
            return i;
        } else {
            if (i == childCount - 1) {
                return mSelectedPanelIndex;
            } else if (i >= mSelectedPanelIndex) {
                return i + 1;
            } else {
                return i;
            }
        }
    
public intgetPanelIndex(PanelView pv)

        final int N = getChildCount();
        for (int i=0; i<N; i++) {
            final PanelView v = (PanelView) getChildAt(i);
            if (pv == v) return i;
        }
        return -1;
    
protected voidonFinishInflate()

        super.onFinishInflate();
        setChildrenDrawingOrderEnabled(true);
    
public booleanonTouchEvent(android.view.MotionEvent event)

        if (DEBUG_GESTURES) {
            if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
                EventLog.writeEvent(EventLogTags.SYSUI_PANELHOLDER_TOUCH,
                        event.getActionMasked(), (int) event.getX(), (int) event.getY());
            }
        }
        return false;
    
public voidsetBar(PanelBar panelBar)

        mBar = panelBar;
    
public voidsetSelectedPanel(PanelView pv)

        mSelectedPanelIndex = getPanelIndex(pv);