fix issue
This commit is contained in:
parent
7d67864fa3
commit
406d894f39
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue