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 vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 345 versionCode 346
versionName '3.2.220' versionName '3.2.240'
multiDexEnabled true 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() appVersion.text = getAppVersion()
setUpView() setUpView()
} }
@ -110,6 +109,7 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
changelog.setOnClickListener(this) changelog.setOnClickListener(this)
openSource.setOnClickListener(this) openSource.setOnClickListener(this)
pinterestLink.setOnClickListener(this) pinterestLink.setOnClickListener(this)
bugReportLink.setOnClickListener(this)
} }
override fun onClick(view: View) { override fun onClick(view: View) {
@ -126,6 +126,7 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
R.id.twitterLink -> openUrl(APP_TWITTER_LINK) R.id.twitterLink -> openUrl(APP_TWITTER_LINK)
R.id.changelog -> showChangeLogOptions() R.id.changelog -> showChangeLogOptions()
R.id.openSource -> NavigationUtil.goToOpenSource(this) 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.annotation.StringRes
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
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.retromusic.R 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.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.Report
import code.name.monkey.retromusic.activities.bugreport.model.github.ExtraInfo 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.GithubLogin
import code.name.monkey.retromusic.activities.bugreport.model.github.GithubTarget 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.MaterialDialog
import com.afollestad.materialdialogs.callbacks.onCancel import com.afollestad.materialdialogs.callbacks.onCancel
import com.google.android.material.floatingactionbutton.FloatingActionButton import com.google.android.material.floatingactionbutton.FloatingActionButton
@ -125,10 +126,10 @@ open class BugReportActivity : AbsThemeActivity() {
TintHelper.setTintAuto(sendFab!!, accentColor, true) TintHelper.setTintAuto(sendFab!!, accentColor, true)
sendFab!!.setOnClickListener { reportIssue() } sendFab!!.setOnClickListener { reportIssue() }
TintHelper.setTintAuto(inputTitle!!, accentColor, false) MaterialUtil.setTint(inputLayoutTitle, false)
TintHelper.setTintAuto(inputDescription!!, accentColor, false) MaterialUtil.setTint(inputLayoutDescription, false)
TintHelper.setTintAuto(inputUsername!!, accentColor, false) MaterialUtil.setTint(inputLayoutUsername, false)
TintHelper.setTintAuto(inputPassword!!, accentColor, false) MaterialUtil.setTint(inputLayoutPassword, false)
} }
private fun reportIssue() { private fun reportIssue() {

View file

@ -45,7 +45,6 @@ class SongTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
private fun setUpViews() { private fun setUpViews() {
fillViewsWithFileTags() fillViewsWithFileTags()
MaterialUtil.setTint(songTextContainer, false) MaterialUtil.setTint(songTextContainer, false)
MaterialUtil.setTint(composerContainer, false) MaterialUtil.setTint(composerContainer, false)
MaterialUtil.setTint(albumTextContainer, false) MaterialUtil.setTint(albumTextContainer, false)
MaterialUtil.setTint(artistContainer, 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.SupportDevelopmentActivity;
import code.name.monkey.retromusic.activities.UserInfoActivity; import code.name.monkey.retromusic.activities.UserInfoActivity;
import code.name.monkey.retromusic.activities.WhatsNewActivity; 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.helper.MusicPlayerRemote;
import code.name.monkey.retromusic.model.Genre; import code.name.monkey.retromusic.model.Genre;
import code.name.monkey.retromusic.model.Playlist; import code.name.monkey.retromusic.model.Playlist;
@ -166,4 +167,8 @@ public class NavigationUtil {
public static void gotoWhatNews(@NonNull Activity activity) { public static void gotoWhatNews(@NonNull Activity activity) {
ActivityCompat.startActivity(activity, new Intent(activity, WhatsNewActivity.class), null); 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" /> app:srcCompat="@drawable/ic_send_white_24dp" />
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

@ -1,13 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?cardBackgroundColor"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
@ -23,7 +15,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
<RadioButton <com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/optionUseAccount" android:id="@+id/optionUseAccount"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -43,14 +35,16 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lineSpacingExtra="8dp"
android:text="@string/bug_report_use_account" android:text="@string/bug_report_use_account"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lineSpacingExtra="8dp"
android:text="@string/your_account_data_is_only_used_for_authentication" android:text="@string/your_account_data_is_only_used_for_authentication"
android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" />
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
@ -75,6 +69,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayoutTitle" android:id="@+id/inputLayoutTitle"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -90,8 +85,10 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayoutDescription" android:id="@+id/inputLayoutDescription"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"> android:layout_marginBottom="8dp">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
@ -116,6 +113,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayoutUsername" android:id="@+id/inputLayoutUsername"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -131,8 +129,10 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayoutPassword" android:id="@+id/inputLayoutPassword"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="8dp">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputPassword" android:id="@+id/inputPassword"
@ -155,7 +155,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
<RadioButton <com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/optionAnonymous" android:id="@+id/optionAnonymous"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -174,18 +174,16 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lineSpacingExtra="8dp"
android:text="@string/bug_report_manual" android:text="@string/bug_report_manual"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lineSpacingExtra="8dp"
android:text="@string/you_will_be_forwarded_to_the_issue_tracker_website" android:text="@string/you_will_be_forwarded_to_the_issue_tracker_website"
android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" />
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View file

@ -199,6 +199,50 @@
</LinearLayout> </LinearLayout>
</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 <LinearLayout
android:id="@+id/appShare" android:id="@+id/appShare"
android:layout_width="match_parent" android:layout_width="match_parent"