All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.solovyev.android.prefs.FloatRangeSeekBarPreference Maven / Gradle / Ivy

There is a newer version: 1.1.18
Show newest version
/*
 * Copyright (c) 2009-2011. Created by serso aka se.solovyev.
 * For more information, please, contact [email protected]
 * or visit http://se.solovyev.org
 */

package org.solovyev.android.prefs;

import android.content.Context;
import android.util.AttributeSet;
import org.jetbrains.annotations.NotNull;
import org.solovyev.common.text.NumberIntervalMapper;

/**
 * User: serso
 * Date: 9/21/11
 * Time: 11:41 PM
 */
public class FloatRangeSeekBarPreference extends RangeSeekBarPreference {

	public FloatRangeSeekBarPreference(@NotNull Context context, AttributeSet attrs) {
		super(context, attrs, new NumberIntervalMapper(Float.class));
	}

    @NotNull
    @Override
    protected Float getDefaultStep() {
        return 1f;
    }

    @NotNull
    @Override
    protected Float add(@NotNull Float l, @NotNull Float r) {
        return l + r;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy