From ae7af9d01a66874065f74846e7edc036d2bf31ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 17 Jan 2024 16:54:02 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BE=8B=E5=A4=96=E3=82=AD=E3=83=A3=E3=83=83?= =?UTF-8?q?=E3=83=81=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/example/childguard/HomeFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/childguard/HomeFragment.java b/app/src/main/java/com/example/childguard/HomeFragment.java index 499a8b6..732633c 100644 --- a/app/src/main/java/com/example/childguard/HomeFragment.java +++ b/app/src/main/java/com/example/childguard/HomeFragment.java @@ -207,10 +207,13 @@ public class HomeFragment extends Fragment implements OnEventListener{ FrameLayout fl; try { tv = requireView().findViewById(R.id.situation); - fl = getView().findViewById(R.id.situation_bg); + fl = requireView().findViewById(R.id.situation_bg); } catch (NullPointerException e) { Log.d("HomeFragment", "updateUiState: view is null"); return; + } catch (Exception e) { + Log.d("HomeFragment", "updateUiState: unknown error"); + return; } String get_on = "\n乗車状態"; String get_off = "\n降車状態";