Code example for Preferences

Methods: putFloat

0
        return new RotationControl(this);
    } 
 
    @Override 
    public void applyStudioConfig(Preferences prefs) {
        prefs.putFloat("rotation", rotation);
    } 
 
    @Override 
    public void loadFromStudioConfig(Preferences prefs) {
        rotation = prefs.getFloat("rotation", rotation);
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java