mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Add getters for name and description of Place
This commit is contained in:
parent
c70eec650c
commit
1fe7b4842d
2 changed files with 9 additions and 2 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 {
|
||||
|
||||
|
|
@ -416,10 +417,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());
|
||||
}
|
||||
});
|
||||
|
|
@ -427,7 +430,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());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -34,10 +34,14 @@ public class Place {
|
|||
this.siteLinks = siteLinks;
|
||||
}
|
||||
|
||||
public String getName() { return name; }
|
||||
|
||||
public Description getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getLongDescription() { return longDescription; }
|
||||
|
||||
public void setDistance(String distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue