mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Move listview initialization to inside if statement
This commit is contained in:
		
							parent
							
								
									2b4f29b625
								
							
						
					
					
						commit
						7a511535ab
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -61,15 +61,16 @@ public class NearbyListFragment extends ListFragment implements TaskListener { | |||
| 
 | ||||
|     @Override | ||||
|     public void onViewCreated(View view, Bundle savedInstanceState) { | ||||
|         listview = (ListView) getView().findViewById(R.id.listview); | ||||
| 
 | ||||
|         if(savedInstanceState == null) { | ||||
|             mLatestLocation = ((NearbyActivity) getActivity()).getmLatestLocation(); | ||||
| 
 | ||||
|             listview = (ListView) getView().findViewById(R.id.listview); | ||||
|             nearbyAsyncTask = new NearbyAsyncTask(this); | ||||
|             nearbyAsyncTask.execute(); | ||||
|             progressBar.setVisibility(View.VISIBLE); | ||||
|             Log.d(TAG, "Saved instance state is null, populating ListView"); | ||||
|         } else { | ||||
|             progressBar.setVisibility(View.GONE); | ||||
|         } | ||||
| 
 | ||||
|         // If we are returning here from a screen orientation | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 misaochan
						misaochan