Implemented 'about'-Activity
This commit is contained in:
parent
5594d149a6
commit
da71678b66
|
@ -124,6 +124,7 @@
|
|||
android:scheme="flattr4j" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:label="@string/about_pref" android:name=".activity.AboutActivity" android:theme="@style/Theme.Sherlock.Light.NoActionBar"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webvAbout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
|
@ -44,8 +44,7 @@
|
|||
</Preference>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/other_pref" >
|
||||
<Preference android:title="@string/version_pref" />
|
||||
<Preference android:title="@string/about_pref" />
|
||||
<Preference android:title="@string/about_pref" android:key="prefAbout"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
|
@ -0,0 +1,23 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
|
||||
/** Displays the 'about' screen */
|
||||
public class AboutActivity extends SherlockActivity {
|
||||
|
||||
private WebView webview;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.about);
|
||||
webview = (WebView) findViewById(R.id.webvAbout);
|
||||
webview.loadUrl("file:///android_asset/about.html");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
|
@ -18,6 +19,7 @@ public class PreferenceActivity extends SherlockPreferenceActivity {
|
|||
private static final String PREF_FLATTR_THIS_APP = "prefFlattrThisApp";
|
||||
private static final String PREF_FLATTR_AUTH = "pref_flattr_authenticate";
|
||||
private static final String PREF_FLATTR_REVOKE = "prefRevokeAccess";
|
||||
private static final String PREF_ABOUT = "prefAbout";
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
|
@ -34,16 +36,29 @@ public class PreferenceActivity extends SherlockPreferenceActivity {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
findPreference(PREF_FLATTR_REVOKE).setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
findPreference(PREF_FLATTR_REVOKE).setOnPreferenceClickListener(
|
||||
new OnPreferenceClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
FlattrUtils.revokeAccessToken(PreferenceActivity.this);
|
||||
checkItemVisibility();
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
FlattrUtils.revokeAccessToken(PreferenceActivity.this);
|
||||
checkItemVisibility();
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
findPreference(PREF_ABOUT).setOnPreferenceClickListener(
|
||||
new OnPreferenceClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
PreferenceActivity.this.startActivity(new Intent(
|
||||
PreferenceActivity.this, AboutActivity.class));
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue