mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Make use of same fragment
This commit is contained in:
		
							parent
							
								
									182f6033d6
								
							
						
					
					
						commit
						244ad5d10f
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		|  | @ -382,6 +382,15 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private NearbyMapFragment getMapFragment() { | ||||
|         return (NearbyMapFragment) getSupportFragmentManager().findFragmentByTag("NearbyMapFragment"); | ||||
|     } | ||||
| 
 | ||||
|     private void updateMapFragment() { | ||||
|         getMapFragment().setArguments(bundle); | ||||
|         getMapFragment().updateMapViewWithLocationChanges(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Calls fragment for map view. | ||||
|      */ | ||||
|  | @ -400,8 +409,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp | |||
|         FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); | ||||
|         Fragment fragment = new NearbyListFragment(); | ||||
|         fragment.setArguments(bundle); | ||||
|         fragmentTransaction.replace(R.id.container_sheet, fragment); | ||||
|         bottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN); | ||||
|         fragmentTransaction.replace(R.id.container, fragment, fragment.getClass().getSimpleName()); | ||||
|         fragmentTransaction.commitAllowingStateLoss(); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 neslihanturan
						neslihanturan