save user settings
<p>Why do not you want to keep the camera zoom after leaving aktivity?</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.menu_old);
         SharedPreferences preferences = getSharedPreferences("goodnight", MODE_PRIVATE);

           yourCheckBox = (CheckBox) findViewById( R.id.fonarb );
           yourCheckBox.setChecked(preferences.getBoolean("lol", false));
           yourCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener()

        {
        @Override
        public void onCheckedChanged(CompoundButton   yourCheckBox,
                boolean isChecked) {
             if (isChecked){

                 Parameters params = camera.getParameters();
                 params.setZoom(5);
                 camera.setParameters(params);


             }
             else {     
                 Parameters params = camera.getParameters();
                 params.setZoom(0);
                 camera.setParameters(params);

             }

        }


        });




 public void onStop() {
     super.onStop();
        SharedPreferences settings = getSharedPreferences("goodnight", MODE_PRIVATE);
         SharedPreferences.Editor editor = settings.edit();
         editor.putBoolean("lol", yourCheckBox.isChecked());


         editor.commit();
    }
</code></pre>
