fixed bugs
This commit is contained in:
parent
13d269449c
commit
2a87a7d8ca
|
|
@ -68,8 +68,6 @@ public class ActivityBaseDetailContent extends AbstractAppCompatActivity {
|
||||||
Intent intent = new Intent(activity, ActivityBaseDetailContent.class);
|
Intent intent = new Intent(activity, ActivityBaseDetailContent.class);
|
||||||
intent.putExtra(ARG_ITEM_TYPE, ARG_ITEM_TYPE_VEHICLE_AND_DEVICE);
|
intent.putExtra(ARG_ITEM_TYPE, ARG_ITEM_TYPE_VEHICLE_AND_DEVICE);
|
||||||
return intent;
|
return intent;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ public class UserProfileFragment
|
||||||
getView().setEnabled(aBoolean);
|
getView().setEnabled(aBoolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
mViewModel.refreshContent();
|
//mViewModel.refreshLocalContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -115,7 +115,7 @@ public class UserProfileFragment
|
||||||
|
|
||||||
mViewModel.storeRemoteVehicles(vehicles);
|
mViewModel.storeRemoteVehicles(vehicles);
|
||||||
|
|
||||||
mViewModel.refreshContent();
|
mViewModel.refreshLocalContent();
|
||||||
}
|
}
|
||||||
}, new DialogInterface.OnClickListener() {
|
}, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -139,7 +139,7 @@ public class UserProfileFragment
|
||||||
|
|
||||||
//region Devices
|
//region Devices
|
||||||
|
|
||||||
mViewModel.getMStoredDevices().observe(getViewLifecycleOwner(), new Observer<List<CustomerDevice>>() {
|
mViewModel.getMDevices().observe(getViewLifecycleOwner(), new Observer<List<CustomerDevice>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(List<CustomerDevice> items) {
|
public void onChanged(List<CustomerDevice> items) {
|
||||||
binding.tvDeviceCount.setText(String.format(Helper.getString(getContext(), R.string.text_devices_count), items.size()));
|
binding.tvDeviceCount.setText(String.format(Helper.getString(getContext(), R.string.text_devices_count), items.size()));
|
||||||
|
|
@ -204,7 +204,7 @@ public class UserProfileFragment
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
|
||||||
mViewModel.refreshContent();
|
mViewModel.refreshLocalContent();
|
||||||
// TODO: Use the ViewModel
|
// TODO: Use the ViewModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ public class UserProfileViewModel extends AbstractBaseViewModel {
|
||||||
@Getter
|
@Getter
|
||||||
private final MutableLiveData<List<Vehicle>> mVehicles;
|
private final MutableLiveData<List<Vehicle>> mVehicles;
|
||||||
@Getter
|
@Getter
|
||||||
|
private final MutableLiveData<List<CustomerDevice>> mDevices;
|
||||||
|
@Getter
|
||||||
private final MutableLiveData<List<CustomerDevice>> mStoredDevices;
|
private final MutableLiveData<List<CustomerDevice>> mStoredDevices;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,6 +42,7 @@ public class UserProfileViewModel extends AbstractBaseViewModel {
|
||||||
mVehicles = new MutableLiveData<>();
|
mVehicles = new MutableLiveData<>();
|
||||||
mRefreshVehicles = new MutableLiveData<>();
|
mRefreshVehicles = new MutableLiveData<>();
|
||||||
mStoredDevices = new MutableLiveData<>();
|
mStoredDevices = new MutableLiveData<>();
|
||||||
|
mDevices = new MutableLiveData<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshVehicles() {
|
public void refreshVehicles() {
|
||||||
|
|
@ -69,9 +72,9 @@ public class UserProfileViewModel extends AbstractBaseViewModel {
|
||||||
mutableLiveDataSuccess.postValue(true);
|
mutableLiveDataSuccess.postValue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshContent() {
|
public void refreshLocalContent() {
|
||||||
refreshVehicles();
|
mVehicles.setValue(localStorageClient.loadVehicles());
|
||||||
refreshDevices();
|
mDevices.setValue(localStorageClient.loadDevices());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeRemoteVehicles(List<Vehicle> items) {
|
public void storeRemoteVehicles(List<Vehicle> items) {
|
||||||
|
|
@ -84,7 +87,7 @@ public class UserProfileViewModel extends AbstractBaseViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshDevices() {
|
public void refreshDevices() {
|
||||||
mStoredDevices.postValue(repository.getStoredUserDevices());
|
mDevices.postValue(repository.getStoredUserDevices());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeRemoteCustomerDevices(List<CustomerDevice> items) {
|
public void storeRemoteCustomerDevices(List<CustomerDevice> items) {
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,6 @@ public class LogsFragment
|
||||||
recyclerView.setAdapter(new LogItemRecyclerViewAdapter(getDatabase().log().getLogs()));
|
recyclerView.setAdapter(new LogItemRecyclerViewAdapter(getDatabase().log().getLogs()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +138,6 @@ public class CustomerContentRepository {
|
||||||
|
|
||||||
public Result<List<Vehicle>> fetchCustomerVehiclesRemote() {
|
public Result<List<Vehicle>> fetchCustomerVehiclesRemote() {
|
||||||
|
|
||||||
|
|
||||||
return dataSource
|
return dataSource
|
||||||
.fetchCustomerVehicles(localStorageClient.getLoggedInUser());
|
.fetchCustomerVehicles(localStorageClient.getLoggedInUser());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/list"
|
android:id="@+id/list"
|
||||||
|
|
|
||||||
|
|
@ -7,211 +7,215 @@
|
||||||
android:background="?android:windowBackground"
|
android:background="?android:windowBackground"
|
||||||
tools:context=".ui.fragments.UserProfileFragment">
|
tools:context=".ui.fragments.UserProfileFragment">
|
||||||
|
|
||||||
<LinearLayout
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:layout_gravity="center"
|
|
||||||
android:nestedScrollingEnabled="true"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:verticalScrollbarPosition="right"
|
|
||||||
|
|
||||||
>
|
<LinearLayout
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/cardDevices"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="8dp">
|
android:layout_gravity="center"
|
||||||
|
android:nestedScrollingEnabled="true"
|
||||||
<LinearLayout
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:verticalScrollbarPosition="right"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<!-- Media -->
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="194dp"
|
|
||||||
android:contentDescription="@string/content_card_description_vehicle"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:srcCompat="@drawable/ic_default_vehicle" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<!-- Title, secondary and supporting text -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/content_card_description_vehicle"
|
|
||||||
android:textAppearance="?attr/textAppearanceHeadline6" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvVehicleUpdate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="@string/text_last_update"
|
|
||||||
android:textAppearance="?attr/textAppearanceBody2"
|
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvVehicleCount"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="@string/text_vehicles_count"
|
|
||||||
android:textAppearance="?attr/textAppearanceBody2"
|
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Buttons -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnVehicleRefresh"
|
|
||||||
style="?attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:text="@string/action_refresh" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnVehicleDelete"
|
|
||||||
style="?attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/action_delete" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnVehicleShow"
|
|
||||||
style="?attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/action_show" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnVehicleAdd"
|
|
||||||
style="?attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/action_new" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/card"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cardDevices"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:layout_margin="8dp">
|
||||||
|
|
||||||
<!-- Media -->
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="194dp"
|
|
||||||
android:contentDescription="@string/content_card_description_devices"
|
|
||||||
android:scaleType="center"
|
|
||||||
app:srcCompat="@drawable/ic_default_device" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<!-- Title, secondary and supporting text -->
|
<!-- Media -->
|
||||||
<TextView
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="194dp"
|
||||||
|
android:contentDescription="@string/content_card_description_vehicle"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:srcCompat="@drawable/ic_default_vehicle" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<!-- Title, secondary and supporting text -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/content_card_description_vehicle"
|
||||||
|
android:textAppearance="?attr/textAppearanceHeadline6" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvVehicleUpdate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/text_last_update"
|
||||||
|
android:textAppearance="?attr/textAppearanceBody2"
|
||||||
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvVehicleCount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/text_vehicles_count"
|
||||||
|
android:textAppearance="?attr/textAppearanceBody2"
|
||||||
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/content_card_description_devices"
|
android:layout_margin="8dp"
|
||||||
android:textAppearance="?attr/textAppearanceHeadline6" />
|
|
||||||
|
|
||||||
<TextView
|
android:orientation="horizontal">
|
||||||
android:id="@+id/tvDeviceUpdate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="@string/text_last_update"
|
|
||||||
android:textAppearance="?attr/textAppearanceBody2"
|
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/tvDeviceCount"
|
android:id="@+id/btnVehicleRefresh"
|
||||||
android:layout_width="wrap_content"
|
style="?attr/borderlessButtonStyle"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/text_devices_count"
|
android:layout_marginEnd="8dp"
|
||||||
android:textAppearance="?attr/textAppearanceBody2"
|
android:text="@string/action_refresh" />
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnVehicleDelete"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_delete" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnVehicleShow"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_show" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnVehicleAdd"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_new" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Buttons -->
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:orientation="vertical">
|
||||||
|
|
||||||
android:orientation="horizontal">
|
<!-- Media -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="194dp"
|
||||||
|
android:contentDescription="@string/content_card_description_devices"
|
||||||
|
android:scaleType="center"
|
||||||
|
app:srcCompat="@drawable/ic_default_device" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<LinearLayout
|
||||||
android:id="@+id/btnDevicesRefresh"
|
android:layout_width="match_parent"
|
||||||
style="?attr/borderlessButtonStyle"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<!-- Title, secondary and supporting text -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/content_card_description_devices"
|
||||||
|
android:textAppearance="?attr/textAppearanceHeadline6" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDeviceUpdate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/text_last_update"
|
||||||
|
android:textAppearance="?attr/textAppearanceBody2"
|
||||||
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDeviceCount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/text_devices_count"
|
||||||
|
android:textAppearance="?attr/textAppearanceBody2"
|
||||||
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_margin="8dp"
|
||||||
android:text="@string/action_refresh" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
android:orientation="horizontal">
|
||||||
android:id="@+id/btnDevicesDelete"
|
|
||||||
style="?attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/action_delete" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnDevicesShow"
|
android:id="@+id/btnDevicesRefresh"
|
||||||
style="?attr/borderlessButtonStyle"
|
style="?attr/borderlessButtonStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/action_show" />
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="@string/action_refresh" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnDevicesDelete"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_delete" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnDevicesShow"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_show" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnDevicesAdd"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_new" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnDevicesAdd"
|
|
||||||
style="?attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/action_new" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
@ -33,6 +33,7 @@ public class LocalStorageClientImpl implements LocalStorageClient {
|
||||||
private static final String PREF_CUSTOMER = "customer";
|
private static final String PREF_CUSTOMER = "customer";
|
||||||
private static final String PREF_VEHICLES = "vehicles";
|
private static final String PREF_VEHICLES = "vehicles";
|
||||||
private static final String PREF_DEVICES = "devices";
|
private static final String PREF_DEVICES = "devices";
|
||||||
|
|
||||||
private final ILogger logger;
|
private final ILogger logger;
|
||||||
|
|
||||||
// private static final String KEY_LOGGEDINUSERNAME = "prefs_loggedin_username";
|
// private static final String KEY_LOGGEDINUSERNAME = "prefs_loggedin_username";
|
||||||
|
|
@ -348,11 +349,11 @@ public class LocalStorageClientImpl implements LocalStorageClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void d(String msg) {
|
private void d(String msg) {
|
||||||
|
|
||||||
if (logger != null)
|
if (logger != null)
|
||||||
logger.d(TAG, msg);
|
logger.d(TAG, msg);
|
||||||
else {
|
else {
|
||||||
Log.d(TAG, msg);
|
Log.d(TAG, msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue