Fix UI search layout

This commit is contained in:
Nezumi
2023-03-09 10:05:33 +07:00
parent 0e0965209d
commit e100a0cf5a
10 changed files with 97 additions and 81 deletions
@@ -120,12 +120,14 @@ public class HomeFragment extends Fragment {
@Override
public void onFailure(Call<List<Food>> call, Throwable t) {
//Check internet connection
if(Common.checkInternetConnection(getContext())){
//Has internet connection
Toast.makeText(getContext(), "Error: " + t, Toast.LENGTH_SHORT).show();
} else {
//No internet, show notification
Common.showErrorInternetConnectionNotification(getActivity());
if(getContext() != null){
if(Common.checkInternetConnection(getContext())){
//Has internet connection
Toast.makeText(getContext(), "Error: " + t, Toast.LENGTH_SHORT).show();
} else {
//No internet, show notification
Common.showErrorInternetConnectionNotification(getActivity());
}
}
}
});