aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java
diff options
context:
space:
mode:
Diffstat (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java')
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java30
1 files changed, 5 insertions, 25 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java
index a2d2290dc..e7a977707 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpFragmentAbout.java
@@ -17,22 +17,15 @@
package org.sufficientlysecure.keychain.ui;
-import java.io.IOException;
-import java.io.InputStream;
-
-import net.nightwhistler.htmlspanner.HtmlSpanner;
-import net.nightwhistler.htmlspanner.JellyBeanSpanFixTextView;
-
+import org.sufficientlysecure.htmltextview.HtmlTextView;
import org.sufficientlysecure.keychain.Constants;
-import org.sufficientlysecure.keychain.helper.OtherHelper;
-import org.sufficientlysecure.keychain.util.Log;
import org.sufficientlysecure.keychain.R;
+import org.sufficientlysecure.keychain.util.Log;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
-import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -57,26 +50,13 @@ public class HelpFragmentAbout extends SherlockFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.help_fragment_about, container, false);
- // load html from html file from /res/raw
- InputStream inputStreamText = getResources().openRawResource(R.raw.help_about);
-
TextView versionText = (TextView) view.findViewById(R.id.help_about_version);
versionText.setText(getString(R.string.help_about_version) + " " + getVersion());
- JellyBeanSpanFixTextView aboutTextView = (JellyBeanSpanFixTextView) view
- .findViewById(R.id.help_about_text);
-
- // load html into textview
- HtmlSpanner htmlSpanner = new HtmlSpanner();
- htmlSpanner.setStripExtraWhiteSpace(true);
- try {
- aboutTextView.setText(htmlSpanner.fromHtml(inputStreamText));
- } catch (IOException e) {
- Log.e(Constants.TAG, "Error while reading raw resources as stream", e);
- }
+ HtmlTextView aboutTextView = (HtmlTextView) view.findViewById(R.id.help_about_text);
- // make links work
- aboutTextView.setMovementMethod(LinkMovementMethod.getInstance());
+ // load html from raw resource (Parsing handled by HtmlTextView library)
+ aboutTextView.setHtmlFromRawResource(getActivity(), R.raw.help_about);
// no flickering when clicking textview for Android < 4
aboutTextView.setTextColor(getResources().getColor(android.R.color.black));