mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 08:43:52 +01:00 
			
		
		
		
	Add getters for name and description of Place
This commit is contained in:
		
							parent
							
								
									fef6e52201
								
							
						
					
					
						commit
						4e082ed1ee
					
				
					 2 changed files with 8 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -40,6 +40,7 @@ import java.util.List;
 | 
			
		|||
 | 
			
		||||
import fr.free.nrw.commons.R;
 | 
			
		||||
import fr.free.nrw.commons.utils.UriDeserializer;
 | 
			
		||||
import timber.log.Timber;
 | 
			
		||||
 | 
			
		||||
public class NearbyMapFragment extends android.support.v4.app.Fragment {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -382,10 +383,12 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
 | 
			
		|||
        title.setText(place.name.toString());
 | 
			
		||||
        distance.setText(place.distance.toString());
 | 
			
		||||
 | 
			
		||||
        Timber.d("Image title: " + place.getName() + "Image desc: " + place.getLongDescription());
 | 
			
		||||
 | 
			
		||||
        fabCamera.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
            @Override
 | 
			
		||||
            public void onClick(View view) {
 | 
			
		||||
                //TODO: Change this to activate camera upload
 | 
			
		||||
                //TODO: Change this to activate camera upload (see ContributionsListFragment)
 | 
			
		||||
                openWebView(place.siteLinks.getWikidataLink());
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
| 
						 | 
				
			
			@ -393,7 +396,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
 | 
			
		|||
        fabGallery.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
            @Override
 | 
			
		||||
            public void onClick(View view) {
 | 
			
		||||
                //TODO: Change this to activate gallery upload
 | 
			
		||||
                //TODO: Change this to activate gallery upload (see ContributionsListFragment)
 | 
			
		||||
                openWebView(place.siteLinks.getWikidataLink());
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,9 +38,9 @@ public class Place {
 | 
			
		|||
        return label;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getLongDescription() {
 | 
			
		||||
        return longDescription;
 | 
			
		||||
    }
 | 
			
		||||
    public String getName() { return name; }
 | 
			
		||||
 | 
			
		||||
    public String getLongDescription() { return longDescription; }
 | 
			
		||||
 | 
			
		||||
    public void setDistance(String distance) {
 | 
			
		||||
        this.distance = distance;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue