mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 14:49:53 +01:00
About menu: Added url method.
This commit is contained in:
@@ -63,41 +63,30 @@ public class AboutFragment extends Fragment {
|
|||||||
briarChangelog = requireActivity().findViewById(R.id.BriarChangelog);
|
briarChangelog = requireActivity().findViewById(R.id.BriarChangelog);
|
||||||
briarWebsite.setOnClickListener(View -> {
|
briarWebsite.setOnClickListener(View -> {
|
||||||
String url = "https://briarproject.org/";
|
String url = "https://briarproject.org/";
|
||||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
goToUrl(url);
|
||||||
i.setData(Uri.parse(url));
|
|
||||||
try {
|
|
||||||
startActivity(i);
|
|
||||||
} catch (ActivityNotFoundException e) {
|
|
||||||
logException(LOG, WARNING, e);
|
|
||||||
Toast.makeText(requireContext(),
|
|
||||||
R.string.error_start_activity, LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
briarSourceCode.setOnClickListener(View -> {
|
briarSourceCode.setOnClickListener(View -> {
|
||||||
String url = "https://code.briarproject.org/briar/briar";
|
String url = "https://code.briarproject.org/briar/briar";
|
||||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
goToUrl(url);
|
||||||
i.setData(Uri.parse(url));
|
|
||||||
try {
|
|
||||||
startActivity(i);
|
|
||||||
} catch (ActivityNotFoundException e) {
|
|
||||||
logException(LOG, WARNING, e);
|
|
||||||
Toast.makeText(requireContext(),
|
|
||||||
R.string.error_start_activity, LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
briarChangelog.setOnClickListener(View -> {
|
briarChangelog.setOnClickListener(View -> {
|
||||||
String url =
|
String url =
|
||||||
"https://code.briarproject.org/briar/briar/-/wikis/changelog";
|
"https://code.briarproject.org/briar/briar/-/wikis/changelog";
|
||||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
goToUrl(url);
|
||||||
i.setData(Uri.parse(url));
|
|
||||||
try {
|
|
||||||
startActivity(i);
|
|
||||||
} catch (ActivityNotFoundException e) {
|
|
||||||
logException(LOG, WARNING, e);
|
|
||||||
Toast.makeText(requireContext(),
|
|
||||||
R.string.error_start_activity, LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void goToUrl(String url) {
|
||||||
|
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||||
|
i.setData(Uri.parse(url));
|
||||||
|
try {
|
||||||
|
startActivity(i);
|
||||||
|
} catch (ActivityNotFoundException e) {
|
||||||
|
logException(LOG, WARNING, e);
|
||||||
|
Toast.makeText(requireContext(),
|
||||||
|
R.string.error_start_activity, LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user