aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-08-03 19:09:59 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-08-03 19:09:59 +0200
commit460f0d5f3346d14ad11821d15cd4828d6cf91046 (patch)
tree7031a83853abfc94b3413a920ca9d904c67d49b6 /OpenKeychain/src/main/java/org/sufficientlysecure
parent9f8ea8257cc14b154b216207eb2a549fd2751bd6 (diff)
downloadopen-keychain-460f0d5f3346d14ad11821d15cd4828d6cf91046.tar.gz
open-keychain-460f0d5f3346d14ad11821d15cd4828d6cf91046.tar.bz2
open-keychain-460f0d5f3346d14ad11821d15cd4828d6cf91046.zip
Update libs
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpAboutFragment.java4
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpMarkdownFragment.java21
2 files changed, 10 insertions, 15 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpAboutFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpAboutFragment.java
index ac4b94d64..acbb695df 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpAboutFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpAboutFragment.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2014 Dominik Schürmann <dominik@dominikschuermann.de>
+ * Copyright (C) 2012-2015 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ public class HelpAboutFragment extends Fragment {
try {
String html = new Markdown4jProcessor().process(
getActivity().getResources().openRawResource(R.raw.help_about));
- aboutTextView.setHtmlFromString(html, true);
+ aboutTextView.setHtmlFromString(html, new HtmlTextView.LocalImageGetter());
} catch (IOException e) {
Log.e(Constants.TAG, "IOException", e);
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpMarkdownFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpMarkdownFragment.java
index 97d39feb1..73ce7e03e 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpMarkdownFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpMarkdownFragment.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2014 Dominik Schürmann <dominik@dominikschuermann.de>
+ * Copyright (C) 2012-2015 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,7 +17,6 @@
package org.sufficientlysecure.keychain.ui;
-import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.TypedValue;
@@ -34,9 +33,6 @@ import org.sufficientlysecure.keychain.util.Log;
import java.io.IOException;
public class HelpMarkdownFragment extends Fragment {
- private Activity mActivity;
-
- private int mHtmlFile;
public static final String ARG_MARKDOWN_RES = "htmlFile";
@@ -56,15 +52,13 @@ public class HelpMarkdownFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- mActivity = getActivity();
-
- mHtmlFile = getArguments().getInt(ARG_MARKDOWN_RES);
+ int mHtmlFile = getArguments().getInt(ARG_MARKDOWN_RES);
- ScrollView scroller = new ScrollView(mActivity);
- HtmlTextView text = new HtmlTextView(mActivity);
+ ScrollView scroller = new ScrollView(getActivity());
+ HtmlTextView text = new HtmlTextView(getActivity());
// padding
- int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, mActivity
+ int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, getActivity()
.getResources().getDisplayMetrics());
text.setPadding(padding, padding, padding, 0);
@@ -72,8 +66,9 @@ public class HelpMarkdownFragment extends Fragment {
// load markdown from raw resource
try {
- String html = new Markdown4jProcessor().process(getActivity().getResources().openRawResource(mHtmlFile));
- text.setHtmlFromString(html, true);
+ String html = new Markdown4jProcessor().process(
+ getActivity().getResources().openRawResource(mHtmlFile));
+ text.setHtmlFromString(html, new HtmlTextView.LocalImageGetter());
} catch (IOException e) {
Log.e(Constants.TAG, "IOException", e);
}