Compare commits
No commits in common. "266d228fc6175fedc813b4cc7065e37f9323f610" and "7fac075a8bc1e54dc4f43ba3ed6fbff3b6c1ebaf" have entirely different histories.
266d228fc6
...
7fac075a8b
|
@ -83,7 +83,6 @@ public class HomeFragment extends Fragment implements OnEventListener {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
Log.d("HomeFragment", "onResume: called");
|
Log.d("HomeFragment", "onResume: called");
|
||||||
this.updateUiState(getIsInCarLocal());
|
this.updateUiState(getIsInCarLocal());
|
||||||
Log.d("isIncar", "onResume: " + getIsInCarLocal());
|
|
||||||
this.updateBluetoothSituation(isBluetoothConnected());
|
this.updateBluetoothSituation(isBluetoothConnected());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,9 +93,7 @@ public class HomeFragment extends Fragment implements OnEventListener {
|
||||||
|
|
||||||
private boolean getIsInCarLocal() {
|
private boolean getIsInCarLocal() {
|
||||||
SharedPreferences pref = requireActivity().getSharedPreferences("app_situation", requireActivity().MODE_PRIVATE);
|
SharedPreferences pref = requireActivity().getSharedPreferences("app_situation", requireActivity().MODE_PRIVATE);
|
||||||
Boolean isInCar = pref.getBoolean("isInCarPref", false);
|
return pref.getBoolean("isInCar", false);
|
||||||
Log.d("isInCarPref","isInCar"+ isInCar);
|
|
||||||
return pref.getBoolean("isInCarPref", false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//画面遷移メソッド
|
//画面遷移メソッド
|
||||||
|
@ -122,8 +119,8 @@ public class HomeFragment extends Fragment implements OnEventListener {
|
||||||
TextView tv;
|
TextView tv;
|
||||||
FrameLayout fl;
|
FrameLayout fl;
|
||||||
try {
|
try {
|
||||||
tv = requireView().findViewById(R.id.car_situation);
|
tv = requireView().findViewById(R.id.situation);
|
||||||
fl = requireView().findViewById(R.id.car_situation_bg);
|
fl = requireView().findViewById(R.id.situation_bg);
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
Log.d("HomeFragment", "updateUiState: view is null");
|
Log.d("HomeFragment", "updateUiState: view is null");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/car_situation_bg"
|
android:id="@+id/situation_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
android:textSize="25dp" />
|
android:textSize="25dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/car_situation"
|
android:id="@+id/situation"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user