mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
commit
5c51e2e00c
2 changed files with 8 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import android.view.ViewTreeObserver;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
@ -273,7 +274,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setOnClickListeners(final Media media) {
|
private void setOnClickListeners(final Media media) {
|
||||||
|
if (licenseLink(media) != null) {
|
||||||
license.setOnClickListener(v -> openWebBrowser(licenseLink(media)));
|
license.setOnClickListener(v -> openWebBrowser(licenseLink(media)));
|
||||||
|
} else {
|
||||||
|
Toast toast = Toast.makeText(getContext(), getString(R.string.null_url), Toast.LENGTH_SHORT);
|
||||||
|
toast.show();
|
||||||
|
}
|
||||||
if (media.getCoordinates() != null) {
|
if (media.getCoordinates() != null) {
|
||||||
coordinates.setOnClickListener(v -> openMap(media.getCoordinates()));
|
coordinates.setOnClickListener(v -> openMap(media.getCoordinates()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@
|
||||||
<string name="login_to_your_account">Login to your account</string>
|
<string name="login_to_your_account">Login to your account</string>
|
||||||
<string name="send_log_file">Send log file</string>
|
<string name="send_log_file">Send log file</string>
|
||||||
<string name="send_log_file_description">Send log file to developers via email</string>
|
<string name="send_log_file_description">Send log file to developers via email</string>
|
||||||
|
<string name="null_url">Error! URL not found</string>
|
||||||
|
|
||||||
<string name="nearby_location_has_not_changed">Location has not changed.</string>
|
<string name="nearby_location_has_not_changed">Location has not changed.</string>
|
||||||
<string name="nearby_location_not_available">Location not available.</string>
|
<string name="nearby_location_not_available">Location not available.</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue