Code example for SeekBar

Methods: getTag

0
        state.putLong("r", r);
        state.putLong("p", p);
    } 
 
    public void onProgressChanged(SeekBar seek, int progress, boolean fromUser) {
        Param param = (Param) seek.getTag();
        Resources resources = getResources();
        long value = progress + 1;
 
        switch (param) {
            case N:
                N = value;
                value = (long) Math.pow(2, value);
                break; 
            case r:
                r = value;
                break; 
            case p:
                p = value;
                break; 
        }