From 36e558a88b2bcf378da3429d3dd6dc08c9588fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 20:35:08 +0900 Subject: [PATCH] =?UTF-8?q?changessituation=E3=82=92=E5=BB=83=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/childguard/MainActivity.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/src/main/java/com/example/childguard/MainActivity.java b/app/src/main/java/com/example/childguard/MainActivity.java index f70bb8d..29cd32d 100644 --- a/app/src/main/java/com/example/childguard/MainActivity.java +++ b/app/src/main/java/com/example/childguard/MainActivity.java @@ -300,16 +300,6 @@ public class MainActivity extends AppCompatActivity { } - public void changessituation() {//乗降状態の管理をするためにHomeFramgentを呼び出すメソッド - - SharedPreferences sharedPreferences = getSharedPreferences("app_situation", MODE_PRIVATE); - //共有プリファレンス 書き込みの準備 - SharedPreferences.Editor E = sharedPreferences.edit(); - Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragmentContainerView); - Boolean isInCar = sharedPreferences.getBoolean("isInCarPref", false);//現在の乗降状態を保存する共有プリファレンス - ((HomeFragment) fragment).onEvent(!isInCar); - } - // @Override // public void onStop() {//アプリをバックグラウンドにした時のメソッド // super.onStop();