global_options.xml: Move 'report issue' from about screen to global menu.

This commit is contained in:
Andreas Schildbach 2018-12-03 16:42:41 +01:00
parent b99433686d
commit 2685db8fe9
7 changed files with 38 additions and 30 deletions

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp" >
<path
android:fillColor="#FF757575"
android:pathData="M12,5C12.74,5 13.47,5.1 14.15,5.29L15.78,2.46C16.06,2 16.67,1.82 17.15,2.1C17.63,2.37 17.79,3 17.5,3.46L16,6.07C17.22,6.78 18.23,7.79 18.93,9H5.07C5.77,7.79 6.78,6.78 8,6.07L6.5,3.46C6.21,3 6.37,2.37 6.85,2.1C7.33,1.82 7.94,2 8.22,2.46L9.85,5.29C10.53,5.1 11.26,5 12,5M20,13C20,17.17 16.82,20.59 12.75,20.97V10.5H19.6C19.86,11.29 20,12.13 20,13M4,13C4,12.13 4.14,11.29 4.4,10.5H11.25V20.97C7.18,20.59 4,17.17 4,13Z" />
</vector>

View file

@ -16,6 +16,16 @@
android:icon="@drawable/ic_oeffi_plans" android:icon="@drawable/ic_oeffi_plans"
android:title="@string/plans_activity_title" android:title="@string/plans_activity_title"
android:titleCondensed="@string/global_options_plans_comment"/> android:titleCondensed="@string/global_options_plans_comment"/>
<item
android:id="@+id/global_options_donate"
android:icon="@drawable/ic_cash_multiple_grey600_24dp"
android:orderInCategory="999"
android:title="@string/global_options_donate_title"/>
<item
android:id="@+id/global_options_report_bug"
android:icon="@drawable/ic_ladybug_grey600_24dp"
android:orderInCategory="999"
android:title="@string/global_options_report_bug_title"/>
<item <item
android:id="@+id/global_options_preferences" android:id="@+id/global_options_preferences"
android:icon="@drawable/ic_settings_grey600_24dp" android:icon="@drawable/ic_settings_grey600_24dp"
@ -26,10 +36,5 @@
android:icon="@drawable/ic_info_outline_grey600_24dp" android:icon="@drawable/ic_info_outline_grey600_24dp"
android:orderInCategory="999" android:orderInCategory="999"
android:title="@string/global_options_about_title"/> android:title="@string/global_options_about_title"/>
<item
android:id="@+id/global_options_donate"
android:icon="@drawable/ic_cash_multiple_grey600_24dp"
android:orderInCategory="999"
android:title="@string/global_options_donate_title"/>
</menu> </menu>

View file

@ -27,9 +27,10 @@
<string name="global_options_stations_comment">Abfahrtszeiten und Verspätungen</string> <string name="global_options_stations_comment">Abfahrtszeiten und Verspätungen</string>
<string name="global_options_directions_comment">Von Tür zu Tür</string> <string name="global_options_directions_comment">Von Tür zu Tür</string>
<string name="global_options_plans_comment">Für den groben Überblick</string> <string name="global_options_plans_comment">Für den groben Überblick</string>
<string name="global_options_donate_title">Spenden</string>
<string name="global_options_report_bug_title">Fehler melden</string>
<string name="global_options_preferences_title">Einstellungen</string> <string name="global_options_preferences_title">Einstellungen</string>
<string name="global_options_about_title">Über Öffi</string> <string name="global_options_about_title">Über Öffi</string>
<string name="global_options_donate_title">Spenden</string>
<!-- preferences --> <!-- preferences -->
<string name="global_preferences_title">Allgemein</string> <string name="global_preferences_title">Allgemein</string>
@ -56,8 +57,6 @@
<string name="about_faq_summary">https://oeffi.schildbach.de/faq.html</string> <string name="about_faq_summary">https://oeffi.schildbach.de/faq.html</string>
<string name="about_feedback_title">Feedback</string> <string name="about_feedback_title">Feedback</string>
<string name="about_market_rate_title">Öffi bewerten oder rezensieren</string> <string name="about_market_rate_title">Öffi bewerten oder rezensieren</string>
<string name="about_report_bug_title">Fehler melden</string>
<string name="about_report_bug_summary">Feedback geben.</string>
<string name="about_community_googleplus_title">Google+ Community</string> <string name="about_community_googleplus_title">Google+ Community</string>
<string name="about_community_googleplus_summary">Diskussionen über die App.</string> <string name="about_community_googleplus_summary">Diskussionen über die App.</string>
<string name="about_donate_title">Spenden</string> <string name="about_donate_title">Spenden</string>

View file

@ -27,9 +27,10 @@
<string name="global_options_stations_comment">Departure times and delays</string> <string name="global_options_stations_comment">Departure times and delays</string>
<string name="global_options_directions_comment">From door to door</string> <string name="global_options_directions_comment">From door to door</string>
<string name="global_options_plans_comment">For a rough overview</string> <string name="global_options_plans_comment">For a rough overview</string>
<string name="global_options_donate_title">Donate</string>
<string name="global_options_report_bug_title">Report bug</string>
<string name="global_options_preferences_title">Preferences</string> <string name="global_options_preferences_title">Preferences</string>
<string name="global_options_about_title">About Offi</string> <string name="global_options_about_title">About Offi</string>
<string name="global_options_donate_title">Donate</string>
<!-- global preferences --> <!-- global preferences -->
<string name="global_preferences_title">Common</string> <string name="global_preferences_title">Common</string>
@ -56,8 +57,6 @@
<string name="about_faq_summary">https://oeffi.schildbach.de/faq.html</string> <string name="about_faq_summary">https://oeffi.schildbach.de/faq.html</string>
<string name="about_feedback_title">Feedback</string> <string name="about_feedback_title">Feedback</string>
<string name="about_market_rate_title">Rate or Review Offi</string> <string name="about_market_rate_title">Rate or Review Offi</string>
<string name="about_report_bug_title">Report Bug</string>
<string name="about_report_bug_summary">Give feedback.</string>
<string name="about_community_googleplus_title">Google+ Community</string> <string name="about_community_googleplus_title">Google+ Community</string>
<string name="about_community_googleplus_summary">Discussions about the app.</string> <string name="about_community_googleplus_summary">Discussions about the app.</string>
<string name="about_donate_title">Donations</string> <string name="about_donate_title">Donations</string>

View file

@ -38,10 +38,6 @@
<Preference <Preference
android:key="about_market_rate" android:key="about_market_rate"
android:title="@string/about_market_rate_title" /> android:title="@string/about_market_rate_title" />
<Preference
android:key="about_report_bug"
android:summary="@string/about_report_bug_summary"
android:title="@string/about_report_bug_title" />
<Preference <Preference
android:key="about_community_googleplus" android:key="about_community_googleplus"
android:summary="@string/about_community_googleplus_summary" android:summary="@string/about_community_googleplus_summary"

View file

@ -18,7 +18,6 @@
package de.schildbach.oeffi; package de.schildbach.oeffi;
import de.schildbach.oeffi.util.ChangelogDialogBuilder; import de.schildbach.oeffi.util.ChangelogDialogBuilder;
import de.schildbach.oeffi.util.ErrorReporter;
import de.schildbach.wallet.integration.android.BitcoinIntegration; import de.schildbach.wallet.integration.android.BitcoinIntegration;
import android.content.Intent; import android.content.Intent;
@ -33,7 +32,6 @@ public class AboutActivity extends PreferenceActivity {
private static final String KEY_ABOUT_TWITTER = "about_twitter"; private static final String KEY_ABOUT_TWITTER = "about_twitter";
private static final String KEY_ABOUT_CHANGELOG = "about_changelog"; private static final String KEY_ABOUT_CHANGELOG = "about_changelog";
private static final String KEY_ABOUT_FAQ = "about_faq"; private static final String KEY_ABOUT_FAQ = "about_faq";
private static final String KEY_ABOUT_REPORT_BUG = "about_report_bug";
private static final String KEY_ABOUT_COMMUNITY_GOOGLEPLUS = "about_community_googleplus"; private static final String KEY_ABOUT_COMMUNITY_GOOGLEPLUS = "about_community_googleplus";
private static final String KEY_ABOUT_DONATE_BITCOIN = "about_donate_bitcoin"; private static final String KEY_ABOUT_DONATE_BITCOIN = "about_donate_bitcoin";
private static final String KEY_ABOUT_DONATE_FLATTR = "about_donate_flattr"; private static final String KEY_ABOUT_DONATE_FLATTR = "about_donate_flattr";
@ -67,9 +65,6 @@ public class AboutActivity extends PreferenceActivity {
} else if (KEY_ABOUT_FAQ.equals(key)) { } else if (KEY_ABOUT_FAQ.equals(key)) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.about_faq_summary)))); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.about_faq_summary))));
finish(); finish();
} else if (KEY_ABOUT_REPORT_BUG.equals(key)) {
ErrorReporter.sendBugMail(this);
finish();
} else if (KEY_ABOUT_COMMUNITY_GOOGLEPLUS.equals(key)) { } else if (KEY_ABOUT_COMMUNITY_GOOGLEPLUS.equals(key)) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.COMMUNITY_GOOGLEPLUS_URL))); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.COMMUNITY_GOOGLEPLUS_URL)));
finish(); finish();

View file

@ -324,16 +324,6 @@ public abstract class OeffiMainActivity extends OeffiActivity {
return true; return true;
} }
case R.id.global_options_preferences: {
startActivity(new Intent(this, PreferencesActivity.class));
return true;
}
case R.id.global_options_about: {
startActivity(new Intent(this, AboutActivity.class));
return true;
}
case R.id.global_options_donate: { case R.id.global_options_donate: {
final PopupMenu popup = new PopupMenu(this, getMyActionBar()); final PopupMenu popup = new PopupMenu(this, getMyActionBar());
popup.inflate(R.menu.donate_menu); popup.inflate(R.menu.donate_menu);
@ -357,6 +347,21 @@ public abstract class OeffiMainActivity extends OeffiActivity {
popup.show(); popup.show();
return true; return true;
} }
case R.id.global_options_report_bug: {
ErrorReporter.sendBugMail(this);
return true;
}
case R.id.global_options_preferences: {
startActivity(new Intent(this, PreferencesActivity.class));
return true;
}
case R.id.global_options_about: {
startActivity(new Intent(this, AboutActivity.class));
return true;
}
} }
return false; return false;