mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 08:43:52 +01:00 
			
		
		
		
	Add onClickListeners for camera and gallery FAB
This commit is contained in:
		
							parent
							
								
									a38c302b72
								
							
						
					
					
						commit
						fef6e52201
					
				
					 1 changed files with 20 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -375,10 +375,28 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
 | 
			
		|||
        commonsButton.setEnabled(place.hasCommonsLink());
 | 
			
		||||
        commonsButton.setOnClickListener(view -> openWebView(place.siteLinks.getCommonsLink()));
 | 
			
		||||
 | 
			
		||||
        icon.setImageResource(place.getDescription().getIcon());
 | 
			
		||||
        description.setText(place.getDescription().getText());
 | 
			
		||||
        icon.setImageResource(place.getLabel().getIcon());
 | 
			
		||||
        description.setText(place.getLabel().getText());
 | 
			
		||||
        title.setText(place.name);
 | 
			
		||||
        distance.setText(place.distance);
 | 
			
		||||
        title.setText(place.name.toString());
 | 
			
		||||
        distance.setText(place.distance.toString());
 | 
			
		||||
 | 
			
		||||
        fabCamera.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
            @Override
 | 
			
		||||
            public void onClick(View view) {
 | 
			
		||||
                //TODO: Change this to activate camera upload
 | 
			
		||||
                openWebView(place.siteLinks.getWikidataLink());
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        fabGallery.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
            @Override
 | 
			
		||||
            public void onClick(View view) {
 | 
			
		||||
                //TODO: Change this to activate gallery upload
 | 
			
		||||
                openWebView(place.siteLinks.getWikidataLink());
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void openWebView(Uri link) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue