EditText txt_url = (EditText) findViewById(R.id.txt_url);
EditText txt_refresh_time = (EditText) findViewById(R.id.txt_refresh_time);
String string_url = txt_url.getText().toString();
String string_refresh_time = txt_refresh_time.getText().toString();
//存入数据
SharedPreferences preferences = getPreferences(MODE_PRIVATE);
Editor editor = preferences.edit();
editor.putString("url", string_url);
editor.putString("refresh_time", string_refresh_time);
editor.commit();
SharedPreferences preferences = getPreferences(MODE_PRIVATE);
String url = preferences.getString("url", "");
String refresh_time = preferences.getString("refresh_time", "");
Toast.makeText(MainActivity.this, "设置已经保存请重启软件"+url +" A "+ refresh_time, Toast.LENGTH_LONG).show();
EditText txt_refresh_time = (EditText) findViewById(R.id.txt_refresh_time);
String string_url = txt_url.getText().toString();
String string_refresh_time = txt_refresh_time.getText().toString();
//存入数据
SharedPreferences preferences = getPreferences(MODE_PRIVATE);
Editor editor = preferences.edit();
editor.putString("url", string_url);
editor.putString("refresh_time", string_refresh_time);
editor.commit();
SharedPreferences preferences = getPreferences(MODE_PRIVATE);
String url = preferences.getString("url", "");
String refresh_time = preferences.getString("refresh_time", "");
Toast.makeText(MainActivity.this, "设置已经保存请重启软件"+url +" A "+ refresh_time, Toast.LENGTH_LONG).show();