Feedback implemented
parent
5d213a9036
commit
c50bc5eed6
|
@ -145,6 +145,24 @@ public class HomeActivity extends AppCompatActivity {
|
|||
Preference.setMyBooleanPref(Helper.project_file, "isLoggedIn", getApplicationContext(), false);
|
||||
Preference.setMyStringPref(Helper.project_file, Helper.firstTimeApiCall, getApplicationContext(), "false");
|
||||
|
||||
Preference.remove(Helper.project_file, Helper.departmentId, getApplicationContext());
|
||||
Preference.remove(Helper.project_file, Helper.departmentName, getApplicationContext());
|
||||
|
||||
Preference.remove(Helper.project_file, Helper.locationSiteId, getApplicationContext());
|
||||
Preference.remove(Helper.project_file, Helper.locationSiteName, getApplicationContext());
|
||||
|
||||
Preference.remove(Helper.project_file, Helper.unitId, getApplicationContext());
|
||||
Preference.remove(Helper.project_file, Helper.unitName, getApplicationContext());
|
||||
|
||||
Preference.remove(Helper.project_file, Helper.floorId, getApplicationContext());
|
||||
Preference.remove(Helper.project_file, Helper.floorName, getApplicationContext());
|
||||
|
||||
Helper.RemoveArrayList(Helper.listCutting,getApplicationContext());
|
||||
Helper.RemoveArrayList(Helper.listStitching,getApplicationContext());
|
||||
Helper.RemoveArrayList(Helper.listChecking,getApplicationContext());
|
||||
Helper.RemoveArrayList(Helper.listPacking,getApplicationContext());
|
||||
Helper.RemoveArrayList(Helper.listSubStore,getApplicationContext());
|
||||
|
||||
finish();
|
||||
Intent i = new Intent(HomeActivity.this, LoginActivity.class);
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
|
|
@ -114,7 +114,7 @@ public class HomeFragment extends Fragment implements DepartmentItemAdapter.OnIt
|
|||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
Log.e("onItemClick: ","--Unit");
|
||||
LocationUnit clickedItem = locationUnitListFiltered.get(position);
|
||||
|
||||
floorTextview.setText(null);
|
||||
//viewModel.setUnit(String.valueOf(clickedItem.getId()));
|
||||
Preference.setMyStringPref(Helper.project_file, Helper.unitId, getActivity(), String.valueOf(clickedItem.getId()));
|
||||
Preference.setMyStringPref(Helper.project_file, Helper.unitName, getActivity(), String.valueOf(clickedItem.getTitle()));
|
||||
|
@ -345,8 +345,10 @@ public class HomeFragment extends Fragment implements DepartmentItemAdapter.OnIt
|
|||
super.onResume();
|
||||
|
||||
isFromPrevious = true;
|
||||
if (!Preference.getMyStringPref(Helper.project_file, Helper.departmentName, getActivity()).equalsIgnoreCase("default")) {
|
||||
searchEditText.setText(Preference.getMyStringPref(Helper.project_file, Helper.departmentName, getActivity()));
|
||||
}
|
||||
}
|
||||
|
||||
public void showProgressDialog() {
|
||||
ProgressDialogFragment progressDialog = new ProgressDialogFragment();
|
||||
|
|
|
@ -68,8 +68,10 @@ public class Preference {
|
|||
|
||||
public static void remove(String fileName, String key, Context context) {
|
||||
// perform validation etc..
|
||||
if (getPrefs(fileName,context).contains(key)) {
|
||||
getPrefs(fileName,context).edit().remove(key).apply();
|
||||
}
|
||||
}
|
||||
public static void removeAll(String fileName, Context context) {
|
||||
// perform validation etc..
|
||||
getPrefs(fileName,context).edit().clear().apply();
|
||||
|
|
Loading…
Reference in New Issue