Beiträge von mgaeckler1964

    savedInstanceState ist nicht dafür gedacht, Werte dauerhaft zu speichern.

    Zum Speichern und Laden benutzt Du SharedPreferences:


    Code
    SharedPreferences settings = getSharedPreferences(CONFIGURATION, 0);
    SharedPreferences.Editor editor = settings.edit();
    editor.putFloat( TOTAL_DISTANCE_KEY, (float)m_totalDistance );
    editor.putFloat( START_SPEED_KEY, (float)m_startSpeed );
    editor.putFloat( TARGET_SPEED_KEY, (float)m_targetSpeed );
    editor.commit(); 



    Code
    SharedPreferences settings = getSharedPreferences(CONFIGURATION, 0);
    m_totalDistance = settings.getFloat(TOTAL_DISTANCE_KEY, 0);
    m_startSpeed = settings.getFloat(START_SPEED_KEY,0);
    m_targetSpeed = settings.getFloat(TARGET_SPEED_KEY,0);