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