diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 6dd38706e5..8ed16a20e8 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -320,7 +320,7 @@ - + reportIssue() + } + + ThemeUtils.colorSnackbar(this, snackbar) + + snackbar.show() + } + + private fun reportIssue() { + ClipboardUtil.copyToClipboard(this, text_view_error.text.toString(), false) + val issueLink = getString(R.string.report_issue_link) + if (!issueLink.isEmpty()) { + val uriUrl = Uri.parse(issueLink) + val intent = Intent(Intent.ACTION_VIEW, uriUrl) + DisplayUtils.startIntentIfAppAvailable(intent, this, R.string.no_browser_available) + } + Toast.makeText(this, R.string.copied_to_clipboard, Toast.LENGTH_LONG).show() } override fun onCreateOptionsMenu(menu: Menu?): Boolean { diff --git a/src/main/res/layout/errorhandling_showerror.xml b/src/main/res/layout/activity_show_error.xml old mode 100755 new mode 100644 similarity index 83% rename from src/main/res/layout/errorhandling_showerror.xml rename to src/main/res/layout/activity_show_error.xml index 510e7ee7b3..a3735d5998 --- a/src/main/res/layout/errorhandling_showerror.xml +++ b/src/main/res/layout/activity_show_error.xml @@ -21,7 +21,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".ui.errorhandling.ErrorShowActivity"> + tools:context=".ui.errorhandling.ShowErrorActivity"> @@ -35,7 +35,10 @@ android:id="@+id/text_view_error" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="@dimen/standard_padding" /> + android:paddingLeft="@dimen/standard_padding" + android:paddingRight="@dimen/standard_padding" + android:paddingTop="@dimen/standard_padding" + android:paddingBottom="@dimen/standard_list_item_size" /> diff --git a/src/main/res/values/setup.xml b/src/main/res/values/setup.xml index 81679fe310..2f9a99daa3 100644 --- a/src/main/res/values/setup.xml +++ b/src/main/res/values/setup.xml @@ -123,7 +123,7 @@ https://help.nextcloud.com/c/clients/android https://www.transifex.com/nextcloud/nextcloud/android/ https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md - https://github.com/nextcloud/android/issues + https://github.com/nextcloud/android/issues/new/choose nc diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 827e06c1fb..d0779da5b1 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -876,4 +876,8 @@ Engineering Test Mode Preferences + + Report issue to tracker? (requires a Github account) + Report + Copied to clipboard