Move Help & Feedback back to navigation drawer
@ -0,0 +1,38 @@
|
||||
package org.tasks.preferences;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.tasks.R;
|
||||
import org.tasks.injection.InjectingPreferenceActivity;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class HelpAndFeedbackActivity extends InjectingPreferenceActivity {
|
||||
|
||||
@Inject DeviceInfo deviceInfo;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.preferences_help);
|
||||
|
||||
findPreference(getString(R.string.contact_developer)).setIntent(
|
||||
new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", "Tasks Support <support@tasks.org>", null)) {{
|
||||
putExtra(Intent.EXTRA_SUBJECT, "Tasks Feedback");
|
||||
putExtra(Intent.EXTRA_TEXT, deviceInfo.getDebugInfo());
|
||||
}});
|
||||
if (!deviceInfo.supportsBilling()) {
|
||||
remove(R.string.TLA_menu_donate);
|
||||
}
|
||||
if (!deviceInfo.isPlayStoreAvailable()) {
|
||||
remove(R.string.rate_tasks);
|
||||
}
|
||||
}
|
||||
|
||||
private void remove(int resId) {
|
||||
getPreferenceScreen().removePreference(findPreference(getString(resId)));
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 719 B |
After Width: | Height: | Size: 865 B |
After Width: | Height: | Size: 846 B |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 524 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 969 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 684 B |
After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 523 B |
After Width: | Height: | Size: 571 B |
After Width: | Height: | Size: 562 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 367 B |
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<Preference
|
||||
android:key="@string/TLA_menu_donate"
|
||||
android:title="@string/TLA_menu_donate">
|
||||
<intent
|
||||
android:targetClass="org.tasks.activities.DonationActivity"
|
||||
android:targetPackage="org.tasks" />
|
||||
</Preference>
|
||||
|
||||
<Preference android:title="@string/source_code">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://github.com/tasks/tasks" />
|
||||
</Preference>
|
||||
|
||||
<Preference android:title="@string/translations">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://github.com/tasks/tasks/wiki/Translations" />
|
||||
</Preference>
|
||||
|
||||
<Preference android:title="@string/report_an_issue">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://github.com/tasks/tasks/issues" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:key="@string/rate_tasks"
|
||||
android:title="@string/rate_tasks">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="market://details?id=org.tasks" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:key="@string/contact_developer"
|
||||
android:title="@string/contact_developer" />
|
||||
|
||||
</PreferenceScreen>
|