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降車状態";