public void onClick(View v) {
    switch(v.getId()){
    case R.id.save2:
        s = text.getText().toString();
        number = Float.parseFloat(num.getText().toString());
        SharedPreferences.Editor editor = shared.edit();
        editor.putString("sharedtext",s);
        editor.putFloat("sharednum",number);
        editor.commit();
        Toast.makeText(this,"save2",Toast.LENGTH_SHORT).show();
        break;
    case R.id.load2:
        String returner = shared.getString("sharedtext","Returner fail");
        float returnnum = shared.getFloat("sharednum","number fail");
        //there is a red mark here^^^^^^^^^(getfloat)
        text.setText(returner);
        //num.set.......how will
        Toast.makeText(this,"load2",Toast.LENGTH_SHORT).show();
        break;
    case R.id.page2:
        intent= new Intent(this,SharedPreferencesActivity.class);
        startActivity(intent);
        Toast.makeText(this,"page2",Toast.LENGTH_SHORT).show();
        break;
    }
//there is a red mark here^^^^^^^^^(getfloat) -an error that keeps me switching into getInt and getFloat
//num.set.......how will i set a number value?
thanks
 
     
     
     
    