Improved bug report screen

This commit is contained in:
h4h13 2019-07-31 17:26:46 +05:30
parent 9d9d709a85
commit 8789eeb854
10 changed files with 224 additions and 176 deletions

View file

@ -13,8 +13,8 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic"
versionCode 345
versionName '3.2.220'
versionCode 346
versionName '3.2.240'
multiDexEnabled true

File diff suppressed because one or more lines are too long

View file

@ -71,7 +71,6 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
appVersion.text = getAppVersion()
setUpView()
}
@ -110,6 +109,7 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
changelog.setOnClickListener(this)
openSource.setOnClickListener(this)
pinterestLink.setOnClickListener(this)
bugReportLink.setOnClickListener(this)
}
override fun onClick(view: View) {
@ -126,6 +126,7 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
R.id.twitterLink -> openUrl(APP_TWITTER_LINK)
R.id.changelog -> showChangeLogOptions()
R.id.openSource -> NavigationUtil.goToOpenSource(this)
R.id.bugReportLink -> NavigationUtil.bugReport(this)
}
}

View file

@ -16,15 +16,16 @@ import androidx.annotation.StringDef
import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.MaterialUtil
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.misc.DialogAsyncTask
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.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.misc.DialogAsyncTask
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.callbacks.onCancel
import com.google.android.material.floatingactionbutton.FloatingActionButton
@ -125,10 +126,10 @@ open class BugReportActivity : AbsThemeActivity() {
TintHelper.setTintAuto(sendFab!!, accentColor, true)
sendFab!!.setOnClickListener { reportIssue() }
TintHelper.setTintAuto(inputTitle!!, accentColor, false)
TintHelper.setTintAuto(inputDescription!!, accentColor, false)
TintHelper.setTintAuto(inputUsername!!, accentColor, false)
TintHelper.setTintAuto(inputPassword!!, accentColor, false)
MaterialUtil.setTint(inputLayoutTitle, false)
MaterialUtil.setTint(inputLayoutDescription, false)
MaterialUtil.setTint(inputLayoutUsername, false)
MaterialUtil.setTint(inputLayoutPassword, false)
}
private fun reportIssue() {

View file

@ -45,7 +45,6 @@ class SongTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
private fun setUpViews() {
fillViewsWithFileTags()
MaterialUtil.setTint(songTextContainer, false)
MaterialUtil.setTint(composerContainer, false)
MaterialUtil.setTint(albumTextContainer, false)
MaterialUtil.setTint(artistContainer, false)

View file

@ -42,6 +42,7 @@ import code.name.monkey.retromusic.activities.SettingsActivity;
import code.name.monkey.retromusic.activities.SupportDevelopmentActivity;
import code.name.monkey.retromusic.activities.UserInfoActivity;
import code.name.monkey.retromusic.activities.WhatsNewActivity;
import code.name.monkey.retromusic.activities.bugreport.BugReportActivity;
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
import code.name.monkey.retromusic.model.Genre;
import code.name.monkey.retromusic.model.Playlist;
@ -166,4 +167,8 @@ public class NavigationUtil {
public static void gotoWhatNews(@NonNull Activity activity) {
ActivityCompat.startActivity(activity, new Intent(activity, WhatsNewActivity.class), null);
}
public static void bugReport(@NonNull Activity activity) {
ActivityCompat.startActivity(activity, new Intent(activity, BugReportActivity.class), null);
}
}

View file

@ -62,5 +62,4 @@
app:srcCompat="@drawable/ic_send_white_24dp" />
</FrameLayout>
</LinearLayout>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?cardBackgroundColor"
@ -13,7 +14,7 @@
android:layout_marginBottom="8dp"
android:orientation="vertical">
<TextView
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
@ -21,18 +22,18 @@
android:paddingTop="24dp"
android:paddingRight="16dp"
android:text="@string/device_info"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary" />
android:textAppearance="@style/TextAppearance.MaterialComponents.Overline" />
<TextView
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/airTextDeviceInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:lineSpacingExtra="8dp"
android:padding="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?android:textColorSecondary" />
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="?android:textColorSecondary"
tools:text="@string/donate_summary" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,191 +1,189 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?cardBackgroundColor"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true">
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:orientation="vertical">
<LinearLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:orientation="vertical">
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<FrameLayout
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/optionUseAccount"
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">
<RadioButton
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:layout_marginLeft="56dp"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bug_report_use_account"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/your_account_data_is_only_used_for_authentication"
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
</FrameLayout>
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:layout_marginLeft="56dp"
android:orientation="vertical"
android:paddingStart="72dp"
android:paddingLeft="72dp"
android:paddingEnd="16dp"
android:paddingRight="16dp">
android:paddingTop="8dp"
android:paddingBottom="8dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/bug_report_issue"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary" />
android:lineSpacingExtra="8dp"
android:text="@string/bug_report_use_account"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayoutTitle"
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"
android:layout_width="match_parent"
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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>
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/login"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayoutUsername"
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"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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>
android:lineSpacingExtra="8dp"
android:text="@string/your_account_data_is_only_used_for_authentication"
android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" />
</LinearLayout>
<FrameLayout
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="72dp"
android:paddingLeft="72dp"
android:paddingEnd="16dp"
android:paddingRight="16dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
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">
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/bug_report_issue"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary" />
<RadioButton
android:id="@+id/optionAnonymous"
<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:gravity="start|center_vertical"
android:minHeight="@dimen/md_listitem_height" />
android:hint="@string/title"
android:inputType="textCapSentences"
android:singleLine="true" />
<LinearLayout
</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:layout_marginStart="56dp"
android:layout_marginLeft="56dp"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp">
android:gravity="top"
android:hint="@string/description"
android:inputType="textMultiLine"
android:minLines="3" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bug_report_manual"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
</com.google.android.material.textfield.TextInputLayout>
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/you_will_be_forwarded_to_the_issue_tracker_website"
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/login"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary" />
</FrameLayout>
<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>
</com.google.android.material.card.MaterialCardView>
<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:layout_marginLeft="56dp"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="8dp"
android:text="@string/bug_report_manual"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
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/TextAppearance.MaterialComponents.Caption" />
</LinearLayout>
</FrameLayout>
</LinearLayout>

View file

@ -199,6 +199,50 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/bugReportLink"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.IconImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/social_buttons"
android:padding="16dp"
app:srcCompat="@drawable/ic_bug_report_white_24dp"
app:tint="@color/md_white_1000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="12dp"
android:paddingTop="8dp"
android:paddingEnd="12dp"
android:paddingBottom="8dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/report_bug"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.85"
android:text="@string/bug_report_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/appShare"
android:layout_width="match_parent"