fix issue

This commit is contained in:
Matthias Schreiner 2019-06-24 22:55:01 +03:00
parent 7d67864fa3
commit 406d894f39
1 changed files with 5 additions and 4 deletions

View File

@ -44,10 +44,11 @@ public class HomeFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_home, container, false);
context = this.getContext();
preferences = PreferenceManager.getDefaultSharedPreferences(this.getContext());
loadPosition();
loadWether();
loadWeather();
return view;
}
@ -66,7 +67,7 @@ public class HomeFragment extends Fragment {
private void loadPosition () {
preferences = PreferenceManager.getDefaultSharedPreferences(this.getContext());
tvLongitude = view.findViewById(R.id.tv_longitude);
tvLatitude = view.findViewById(R.id.tv_latitude);
@ -96,7 +97,7 @@ public class HomeFragment extends Fragment {
handler.post(runnableCode);
}
private void loadWether (){
private void loadWeather (){
Weather weather;
@ -133,7 +134,7 @@ public class HomeFragment extends Fragment {
public void refresh(){
loadPosition();
loadWether();
loadWeather();
}