Added preference item to flattr this app
This commit is contained in:
parent
0e8909807d
commit
f3c19b6da2
|
@ -61,7 +61,7 @@
|
|||
<string name="position_default_label">00:00:00</string>
|
||||
<string name="queue_label">Queue</string>
|
||||
<string name="visit_website_label">Visit Website</string>
|
||||
<string name="support_label">Support</string>
|
||||
<string name="support_label">Flattr this</string>
|
||||
<string name="download_error_parser_exception">Parser Exception</string>
|
||||
<string name="download_error_unsupported_type">Unsupported Feed type</string>
|
||||
<string name="error_label">Error</string>
|
||||
|
@ -114,5 +114,7 @@
|
|||
<string name="action_forbidden_title">Action forbidden</string>
|
||||
<string name="action_forbidden_msg">Antennapod has no permission for this action. The reason for this could be that the access token of Antennapod to your account has been revoked. You can either re-reauthenticate or visit the website of the thing instead.</string>
|
||||
<string name="flattr_click_success">Successfully flattred this thing!</string>
|
||||
<string name="pref_flattr_this_app_title">Flattr this app</string>
|
||||
<string name="pref_flattr_this_app_sum">Support the development of Antennacast by flattring it. Thanks!</string>
|
||||
|
||||
</resources>
|
|
@ -35,8 +35,12 @@
|
|||
<PreferenceScreen
|
||||
android:summary="@string/pref_flattr_auth_sum"
|
||||
android:title="@string/pref_flattr_auth_title" >
|
||||
<intent android:action=".activities.FlattrAuthActivity"/>
|
||||
<intent android:action=".activities.FlattrAuthActivity" />
|
||||
</PreferenceScreen>
|
||||
<Preference
|
||||
android:summary="@string/pref_flattr_this_app_sum"
|
||||
android:title="@string/pref_flattr_this_app_title" android:key="prefFlattrThisApp">
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/other_pref" >
|
||||
<Preference android:title="@string/version_pref" />
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package de.podfetcher.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
|
@ -9,11 +12,23 @@ import com.actionbarsherlock.view.MenuItem;
|
|||
import de.podfetcher.R;
|
||||
|
||||
public class PreferenceActivity extends SherlockPreferenceActivity {
|
||||
private static final String TAG = "PreferenceActivity";
|
||||
|
||||
private static final String PREF_FLATTR_THIS_APP = "prefFlattrThisApp";
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
findPreference(PREF_FLATTR_THIS_APP).setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
Log.d(TAG, "Flattring this app");
|
||||
return true;
|
||||
}});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue