mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +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.setEnabled(place.hasCommonsLink());
|
||||||
commonsButton.setOnClickListener(view -> openWebView(place.siteLinks.getCommonsLink()));
|
commonsButton.setOnClickListener(view -> openWebView(place.siteLinks.getCommonsLink()));
|
||||||
|
|
||||||
icon.setImageResource(place.getDescription().getIcon());
|
icon.setImageResource(place.getLabel().getIcon());
|
||||||
description.setText(place.getDescription().getText());
|
description.setText(place.getLabel().getText());
|
||||||
title.setText(place.name);
|
title.setText(place.name);
|
||||||
distance.setText(place.distance);
|
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) {
|
private void openWebView(Uri link) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue