Add Help & Feedback to navigation drawer
@ -0,0 +1,31 @@
|
|||||||
|
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", "Alex Baker<baker.alex+tasks@gmail.com>", null)) {{
|
||||||
|
putExtra(Intent.EXTRA_SUBJECT, "Tasks Feedback");
|
||||||
|
putExtra(Intent.EXTRA_TEXT, deviceInfo.getDebugInfo());
|
||||||
|
}});
|
||||||
|
if (!deviceInfo.isPlayStoreAvailable()) {
|
||||||
|
getPreferenceScreen().removePreference(findPreference(getString(R.string.rate_tasks)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 846 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 882 B |
|
After Width: | Height: | Size: 562 B |
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<Preference android:title="@string/source_code">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:data="https://github.com/abaker/tasks" />
|
||||||
|
</Preference>
|
||||||
|
|
||||||
|
<Preference android:title="@string/translations">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:data="https://github.com/abaker/tasks/wiki/Translations" />
|
||||||
|
</Preference>
|
||||||
|
|
||||||
|
<Preference android:title="@string/report_an_issue">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:data="https://github.com/abaker/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>
|
||||||