Removed Sending bug report with GitHub account as it doesn't work anymore
This commit is contained in:
parent
c881bbfa98
commit
3493ad40ab
4 changed files with 26 additions and 421 deletions
|
@ -161,7 +161,6 @@ dependencies {
|
||||||
|
|
||||||
implementation "dev.chrisbanes.insetter:insetter:0.6.1"
|
implementation "dev.chrisbanes.insetter:insetter:0.6.1"
|
||||||
|
|
||||||
implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5'
|
|
||||||
implementation 'com.github.Adonai:jaudiotagger:2.3.15'
|
implementation 'com.github.Adonai:jaudiotagger:2.3.15'
|
||||||
normalImplementation 'com.anjlab.android.iab.v3:library:2.0.3'
|
normalImplementation 'com.anjlab.android.iab.v3:library:2.0.3'
|
||||||
implementation 'com.r0adkll:slidableactivity:2.1.0'
|
implementation 'com.r0adkll:slidableactivity:2.1.0'
|
||||||
|
|
|
@ -19,53 +19,17 @@ import android.content.ClipboardManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.inputmethod.EditorInfo
|
|
||||||
import androidx.annotation.StringDef
|
|
||||||
import androidx.annotation.StringRes
|
|
||||||
import androidx.core.content.getSystemService
|
import androidx.core.content.getSystemService
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import androidx.lifecycle.lifecycleScope
|
|
||||||
import code.name.monkey.appthemehelper.util.MaterialUtil
|
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.activities.base.AbsThemeActivity
|
import code.name.monkey.retromusic.activities.base.AbsThemeActivity
|
||||||
import code.name.monkey.retromusic.activities.bugreport.model.DeviceInfo
|
import code.name.monkey.retromusic.activities.bugreport.model.DeviceInfo
|
||||||
import code.name.monkey.retromusic.activities.bugreport.model.Report
|
|
||||||
import code.name.monkey.retromusic.activities.bugreport.model.github.ExtraInfo
|
|
||||||
import code.name.monkey.retromusic.activities.bugreport.model.github.GithubLogin
|
|
||||||
import code.name.monkey.retromusic.activities.bugreport.model.github.GithubTarget
|
|
||||||
import code.name.monkey.retromusic.databinding.ActivityBugReportBinding
|
import code.name.monkey.retromusic.databinding.ActivityBugReportBinding
|
||||||
import code.name.monkey.retromusic.extensions.accentColor
|
import code.name.monkey.retromusic.extensions.accentColor
|
||||||
import code.name.monkey.retromusic.extensions.setTaskDescriptionColorAuto
|
import code.name.monkey.retromusic.extensions.setTaskDescriptionColorAuto
|
||||||
import code.name.monkey.retromusic.extensions.showToast
|
import code.name.monkey.retromusic.extensions.showToast
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import kotlinx.coroutines.withContext
|
|
||||||
import org.eclipse.egit.github.core.Issue
|
|
||||||
import org.eclipse.egit.github.core.client.GitHubClient
|
|
||||||
import org.eclipse.egit.github.core.client.RequestException
|
|
||||||
import org.eclipse.egit.github.core.service.IssueService
|
|
||||||
import java.io.IOException
|
|
||||||
|
|
||||||
private const val RESULT_SUCCESS = "RESULT_OK"
|
|
||||||
private const val RESULT_BAD_CREDENTIALS = "RESULT_BAD_CREDENTIALS"
|
|
||||||
private const val RESULT_INVALID_TOKEN = "RESULT_INVALID_TOKEN"
|
|
||||||
private const val RESULT_ISSUES_NOT_ENABLED = "RESULT_ISSUES_NOT_ENABLED"
|
|
||||||
private const val RESULT_UNKNOWN = "RESULT_UNKNOWN"
|
|
||||||
|
|
||||||
@StringDef(
|
|
||||||
RESULT_SUCCESS,
|
|
||||||
RESULT_BAD_CREDENTIALS,
|
|
||||||
RESULT_INVALID_TOKEN,
|
|
||||||
RESULT_ISSUES_NOT_ENABLED,
|
|
||||||
RESULT_UNKNOWN
|
|
||||||
)
|
|
||||||
@Retention(AnnotationRetention.SOURCE)
|
|
||||||
private annotation class Result
|
|
||||||
|
|
||||||
open class BugReportActivity : AbsThemeActivity() {
|
open class BugReportActivity : AbsThemeActivity() {
|
||||||
|
|
||||||
|
@ -91,72 +55,19 @@ open class BugReportActivity : AbsThemeActivity() {
|
||||||
setSupportActionBar(binding.toolbar)
|
setSupportActionBar(binding.toolbar)
|
||||||
ToolbarContentTintHelper.colorBackButton(binding.toolbar)
|
ToolbarContentTintHelper.colorBackButton(binding.toolbar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
TintHelper.setTintAuto(binding.cardReport.optionUseAccount, accentColor, false)
|
|
||||||
binding.cardReport.optionUseAccount.setOnClickListener {
|
|
||||||
binding.cardReport.inputTitle.isEnabled = true
|
|
||||||
binding.cardReport.inputDescription.isEnabled = true
|
|
||||||
binding.cardReport.inputUsername.isEnabled = true
|
|
||||||
binding.cardReport.inputPassword.isEnabled = true
|
|
||||||
|
|
||||||
binding.cardReport.optionAnonymous.isChecked = false
|
|
||||||
binding.sendFab.hide(object : FloatingActionButton.OnVisibilityChangedListener() {
|
|
||||||
override fun onHidden(fab: FloatingActionButton?) {
|
|
||||||
super.onHidden(fab)
|
|
||||||
binding.sendFab.setImageResource(R.drawable.ic_send)
|
|
||||||
binding.sendFab.show()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
TintHelper.setTintAuto(binding.cardReport.optionAnonymous, accentColor, false)
|
|
||||||
binding.cardReport.optionAnonymous.setOnClickListener {
|
|
||||||
binding.cardReport.inputTitle.isEnabled = false
|
|
||||||
binding.cardReport.inputDescription.isEnabled = false
|
|
||||||
binding.cardReport.inputUsername.isEnabled = false
|
|
||||||
binding.cardReport.inputPassword.isEnabled = false
|
|
||||||
|
|
||||||
binding.cardReport.optionUseAccount.isChecked = false
|
|
||||||
binding.sendFab.hide(object : FloatingActionButton.OnVisibilityChangedListener() {
|
|
||||||
override fun onHidden(fab: FloatingActionButton?) {
|
|
||||||
super.onHidden(fab)
|
|
||||||
binding.sendFab.setImageResource(R.drawable.ic_open_in_browser)
|
|
||||||
binding.sendFab.show()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.cardReport.inputPassword.setOnEditorActionListener { _, actionId, _ ->
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEND) {
|
|
||||||
reportIssue()
|
|
||||||
return@setOnEditorActionListener true
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.cardDeviceInfo.airTextDeviceInfo.setOnClickListener { copyDeviceInfoToClipBoard() }
|
binding.cardDeviceInfo.airTextDeviceInfo.setOnClickListener { copyDeviceInfoToClipBoard() }
|
||||||
|
|
||||||
TintHelper.setTintAuto(binding.sendFab, accentColor, true)
|
TintHelper.setTintAuto(binding.sendFab, accentColor, true)
|
||||||
binding.sendFab.setOnClickListener { reportIssue() }
|
binding.sendFab.setOnClickListener { reportIssue() }
|
||||||
|
|
||||||
MaterialUtil.setTint(binding.cardReport.inputLayoutTitle, false)
|
|
||||||
MaterialUtil.setTint(binding.cardReport.inputLayoutDescription, false)
|
|
||||||
MaterialUtil.setTint(binding.cardReport.inputLayoutUsername, false)
|
|
||||||
MaterialUtil.setTint(binding.cardReport.inputLayoutPassword, false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun reportIssue() {
|
private fun reportIssue() {
|
||||||
if (binding.cardReport.optionUseAccount.isChecked) {
|
copyDeviceInfoToClipBoard()
|
||||||
if (!validateInput()) return
|
val i = Intent(Intent.ACTION_VIEW)
|
||||||
val username = binding.cardReport.inputUsername.text.toString()
|
i.data = ISSUE_TRACKER_LINK.toUri()
|
||||||
val password = binding.cardReport.inputPassword.text.toString()
|
i.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
sendBugReport(GithubLogin(username, password))
|
startActivity(i)
|
||||||
} else {
|
|
||||||
copyDeviceInfoToClipBoard()
|
|
||||||
|
|
||||||
val i = Intent(Intent.ACTION_VIEW)
|
|
||||||
i.data = ISSUE_TRACKER_LINK.toUri()
|
|
||||||
i.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
|
||||||
startActivity(i)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun copyDeviceInfoToClipBoard() {
|
private fun copyDeviceInfoToClipBoard() {
|
||||||
|
@ -166,67 +77,6 @@ open class BugReportActivity : AbsThemeActivity() {
|
||||||
showToast(R.string.copied_device_info_to_clipboard)
|
showToast(R.string.copied_device_info_to_clipboard)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun validateInput(): Boolean {
|
|
||||||
var hasErrors = false
|
|
||||||
|
|
||||||
if (binding.cardReport.optionUseAccount.isChecked) {
|
|
||||||
if (binding.cardReport.inputUsername.text.isNullOrEmpty()) {
|
|
||||||
setError(binding.cardReport.inputLayoutUsername, R.string.bug_report_no_username)
|
|
||||||
hasErrors = true
|
|
||||||
} else {
|
|
||||||
removeError(binding.cardReport.inputLayoutUsername)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (binding.cardReport.inputPassword.text.isNullOrEmpty()) {
|
|
||||||
setError(binding.cardReport.inputLayoutPassword, R.string.bug_report_no_password)
|
|
||||||
hasErrors = true
|
|
||||||
} else {
|
|
||||||
removeError(binding.cardReport.inputLayoutPassword)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (binding.cardReport.inputTitle.text.isNullOrEmpty()) {
|
|
||||||
setError(binding.cardReport.inputLayoutTitle, R.string.bug_report_no_title)
|
|
||||||
hasErrors = true
|
|
||||||
} else {
|
|
||||||
removeError(binding.cardReport.inputLayoutTitle)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (binding.cardReport.inputDescription.text.isNullOrEmpty()) {
|
|
||||||
setError(binding.cardReport.inputLayoutDescription, R.string.bug_report_no_description)
|
|
||||||
hasErrors = true
|
|
||||||
} else {
|
|
||||||
removeError(binding.cardReport.inputLayoutDescription)
|
|
||||||
}
|
|
||||||
|
|
||||||
return !hasErrors
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setError(editTextLayout: TextInputLayout, @StringRes errorRes: Int) {
|
|
||||||
editTextLayout.error = getString(errorRes)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun removeError(editTextLayout: TextInputLayout) {
|
|
||||||
editTextLayout.error = null
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun sendBugReport(login: GithubLogin) {
|
|
||||||
if (!validateInput()) return
|
|
||||||
|
|
||||||
val bugTitle = binding.cardReport.inputTitle.text.toString()
|
|
||||||
val bugDescription = binding.cardReport.inputDescription.text.toString()
|
|
||||||
|
|
||||||
val extraInfo = ExtraInfo()
|
|
||||||
onSaveExtraInfo()
|
|
||||||
|
|
||||||
val report = Report(bugTitle, bugDescription, deviceInfo, extraInfo)
|
|
||||||
val target = GithubTarget("RetroMusicPlayer", "RetroMusicPlayer")
|
|
||||||
|
|
||||||
reportIssue(report, target, login)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun onSaveExtraInfo() {}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
if (item.itemId == android.R.id.home) {
|
if (item.itemId == android.R.id.home) {
|
||||||
onBackPressed()
|
onBackPressed()
|
||||||
|
@ -234,83 +84,8 @@ open class BugReportActivity : AbsThemeActivity() {
|
||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun reportIssue(
|
|
||||||
report: Report,
|
|
||||||
target: GithubTarget,
|
|
||||||
login: GithubLogin
|
|
||||||
) {
|
|
||||||
val client: GitHubClient = if (login.shouldUseApiToken()) {
|
|
||||||
GitHubClient().setOAuth2Token(login.apiToken)
|
|
||||||
} else {
|
|
||||||
GitHubClient().setCredentials(login.username, login.password)
|
|
||||||
}
|
|
||||||
|
|
||||||
val issue = Issue().setTitle(report.title).setBody(report.getDescription())
|
|
||||||
|
|
||||||
lifecycleScope.launch(Dispatchers.IO) {
|
|
||||||
val result = try {
|
|
||||||
IssueService(client).createIssue(target.username, target.repository, issue)
|
|
||||||
RESULT_SUCCESS
|
|
||||||
} catch (e: RequestException) {
|
|
||||||
when (e.status) {
|
|
||||||
STATUS_BAD_CREDENTIALS -> {
|
|
||||||
if (login.shouldUseApiToken()) RESULT_INVALID_TOKEN else RESULT_BAD_CREDENTIALS
|
|
||||||
}
|
|
||||||
STATUS_ISSUES_NOT_ENABLED -> RESULT_ISSUES_NOT_ENABLED
|
|
||||||
else -> {
|
|
||||||
RESULT_UNKNOWN
|
|
||||||
throw e
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e: IOException) {
|
|
||||||
e.printStackTrace()
|
|
||||||
RESULT_UNKNOWN
|
|
||||||
}
|
|
||||||
|
|
||||||
withContext(Dispatchers.Main) {
|
|
||||||
val activity = this@BugReportActivity
|
|
||||||
when (result) {
|
|
||||||
RESULT_SUCCESS -> MaterialAlertDialogBuilder(activity)
|
|
||||||
.setTitle(R.string.bug_report_success)
|
|
||||||
.setPositiveButton(android.R.string.ok) { _, _ -> tryToFinishActivity() }
|
|
||||||
.show()
|
|
||||||
RESULT_BAD_CREDENTIALS -> MaterialAlertDialogBuilder(activity)
|
|
||||||
.setTitle(R.string.bug_report_failed)
|
|
||||||
.setMessage(R.string.bug_report_failed_wrong_credentials)
|
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
|
||||||
.show()
|
|
||||||
RESULT_INVALID_TOKEN -> MaterialAlertDialogBuilder(activity)
|
|
||||||
.setTitle(R.string.bug_report_failed)
|
|
||||||
.setMessage(R.string.bug_report_failed_invalid_token)
|
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
|
||||||
.show()
|
|
||||||
RESULT_ISSUES_NOT_ENABLED -> MaterialAlertDialogBuilder(activity)
|
|
||||||
.setTitle(R.string.bug_report_failed)
|
|
||||||
.setMessage(R.string.bug_report_failed_issues_not_available)
|
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
|
||||||
.show()
|
|
||||||
else -> MaterialAlertDialogBuilder(activity)
|
|
||||||
.setTitle(R.string.bug_report_failed)
|
|
||||||
.setMessage(R.string.bug_report_failed_unknown)
|
|
||||||
.setPositiveButton(android.R.string.ok) { _, _ -> tryToFinishActivity() }
|
|
||||||
.setNegativeButton(android.R.string.cancel) { _, _ -> tryToFinishActivity() }
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun tryToFinishActivity() {
|
|
||||||
if (!isFinishing) {
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private const val STATUS_BAD_CREDENTIALS = 401
|
|
||||||
private const val STATUS_ISSUES_NOT_ENABLED = 410
|
|
||||||
private const val ISSUE_TRACKER_LINK =
|
private const val ISSUE_TRACKER_LINK =
|
||||||
"https://github.com/RetroMusicPlayer/RetroMusicPlayer"
|
"https://github.com/RetroMusicPlayer/RetroMusicPlayer/issues"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,28 @@
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<LinearLayout
|
||||||
android:id="@+id/card_report"
|
|
||||||
layout="@layout/bug_report_card_report"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp" />
|
android:layout_marginStart="16dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:lineSpacingExtra="8dp"
|
||||||
|
android:text="@string/bug_report_manual"
|
||||||
|
android:textAppearance="@style/TextViewSubtitle1" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:lineSpacingExtra="8dp"
|
||||||
|
android:text="@string/you_will_be_forwarded_to_the_issue_tracker_website"
|
||||||
|
android:textAppearance="@style/TextViewCaption" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/card_device_info"
|
android:id="@+id/card_device_info"
|
||||||
|
|
|
@ -1,185 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:minHeight="@dimen/md_listitem_height"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:paddingRight="16dp">
|
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
||||||
android:id="@+id/optionUseAccount"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:minHeight="@dimen/md_listitem_height" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="56dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:lineSpacingExtra="8dp"
|
|
||||||
android:text="@string/bug_report_use_account"
|
|
||||||
android:textAppearance="@style/TextViewSubtitle1" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:lineSpacingExtra="8dp"
|
|
||||||
android:text="@string/your_account_data_is_only_used_for_authentication"
|
|
||||||
android:textAppearance="@style/TextViewCaption" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingStart="72dp"
|
|
||||||
android:paddingEnd="16dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:text="@string/bug_report_issue"
|
|
||||||
android:textAppearance="@style/TextViewOverline"
|
|
||||||
android:textColor="?android:textColorSecondary" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/inputLayoutTitle"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/inputTitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/title"
|
|
||||||
android:inputType="textCapSentences"
|
|
||||||
android:singleLine="true" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/inputLayoutDescription"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/inputDescription"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="top"
|
|
||||||
android:hint="@string/description"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:minLines="3" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:text="@string/login"
|
|
||||||
android:textAppearance="@style/TextViewOverline"
|
|
||||||
android:textColor="?android:textColorSecondary" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/inputLayoutUsername"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/inputUsername"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/username"
|
|
||||||
android:inputType="textNoSuggestions"
|
|
||||||
android:singleLine="true" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/inputLayoutPassword"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/inputPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/password"
|
|
||||||
android:imeOptions="actionSend"
|
|
||||||
android:inputType="textPassword" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:minHeight="@dimen/md_listitem_height"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:paddingRight="16dp">
|
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
||||||
android:id="@+id/optionAnonymous"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:minHeight="@dimen/md_listitem_height" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="56dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:lineSpacingExtra="8dp"
|
|
||||||
android:text="@string/bug_report_manual"
|
|
||||||
android:textAppearance="@style/TextViewSubtitle1" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:lineSpacingExtra="8dp"
|
|
||||||
android:text="@string/you_will_be_forwarded_to_the_issue_tracker_website"
|
|
||||||
android:textAppearance="@style/TextViewCaption" />
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
</LinearLayout>
|
|
Loading…
Add table
Add a link
Reference in a new issue