Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to create a saving xml file with Shared Preference

How to create a saving xml file with Shared Preference

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

How to create a saving xml file with Shared Preference

Postby Vuvi33 » Thu Nov 18, 2010 3:21 am

I have another question please.

Code: Select all
public class Settings extends Activity implements OnClickListener{
   
   Button b3, b4;

   public static final String PREFS_SETTINGS = "mySharedPreferences";
   
--Ommitted --
         
         @Override
         public void onClick(View v) {      
            
            int mode = Activity.MODE_PRIVATE;
            //SharedPreferences mySharedPreferences = getSharedPreferences(PREFS_SETTINGS,mode);
            
              //SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
            
            //Intent data = new Intent();
              EditText na1 = (EditText) findViewById(R.id.txt_Person1);
              na1.setText(PREFS_SETTINGS, null);
              EditText na2 = (EditText) findViewById(R.id.txt_Person2);
              na2.setText(PREFS_SETTINGS, null);



            showDialog(0);
            
         }
      });
   
    }
   



When I typed "Tim" in the textbox and select the "Save" button, the text in the textbox is chnaged to "mySharedPreferences". Can I know where my mistake is and how to correct it.

and

May I ask how can I save my data using the codes below.

Code: Select all
            int mode = Activity.MODE_PRIVATE;
            //SharedPreferences mySharedPreferences = getSharedPreferences(PREFS_SETTINGS,mode);
            
              //SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);



I'm creating a xml files after saving. But I don't how to.

Thank you. Help greatly appreciate. :)
Vuvi33
Freshman
Freshman
 
Posts: 3
Joined: Wed Nov 10, 2010 7:47 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest