2014-07-15 9 views

risposta

7

si può provare qualcosa di simile:

final float animatorSpeed; 
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { 
     animatorSpeed = Settings.Global.getFloat(
       context.getContentResolver(), 
       Settings.Global.ANIMATOR_DURATION_SCALE, 
       0); 
    } else { 
     animatorSpeed = Settings.System.getFloat(
       context.getContentResolver(), 
       Settings.System.ANIMATOR_DURATION_SCALE, 
       0); 
    } 
+1

dimenticato di dire. Versione minima: 16 – IuriiO

+1

Non dimenticare di provare {...} catch (Settings.SettingNotFoundException e) – CoolMind

Problemi correlati