Code example for SparseIntArray

Methods: clear

0
    public void removeAllSlots() { 
        ensureChildren(); 
        removeAllViews();
        addView(mRulerView);
        addView(mNowView);
        columnArray.clear();
    } 
 
    public void addSlot(SlotView slotView) {
        slotView.setDrawingCacheEnabled(true);
        final int columnIndex = slotView.getColumn();
        int curEntries = columnArray.get(columnIndex + 1, 0);
        columnArray.put(columnIndex, ++curEntries);
        addView(slotView, 1);
    } 
 
    @Override 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        ensureChildren(); 
 
        mRulerView.measure(widthMeasureSpec, heightMeasureSpec);