test1
This commit is contained in:
parent
b297ebacfd
commit
609b1c84ce
|
@ -55,7 +55,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
SharedPreferences sharedPreferences = getSharedPreferences("user",MODE_PRIVATE);
|
SharedPreferences sharedPreferences = getSharedPreferences("user",MODE_PRIVATE);
|
||||||
SharedPreferences.Editor editor = sharedPreferences.edit();
|
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||||
// editor.remove("name");
|
//
|
||||||
editor.clear(); //删除当前文件中所有的值
|
editor.clear(); //删除当前文件中所有的值
|
||||||
editor.commit();
|
editor.commit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue