mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
better help screen
This commit is contained in:
parent
586358599e
commit
182524bb96
BIN
org_apg/libs/htmlcleaner-2.2.jar
Normal file
BIN
org_apg/libs/htmlcleaner-2.2.jar
Normal file
Binary file not shown.
BIN
org_apg/libs/htmlspanner-0.2-fork.jar
Normal file
BIN
org_apg/libs/htmlspanner-0.2-fork.jar
Normal file
Binary file not shown.
@ -51,7 +51,7 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
<net.nightwhistler.htmlspanner.JellyBeanSpanFixTextView
|
||||
android:id="@+id/help_about_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -6,15 +6,26 @@ And don't add newlines before or after p tags because of transifex -->
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="https://github.com/dschuermann/apg">https://github.com/dschuermann/apg</a></p>
|
||||
<p>Android Privacy Guard (APG) is a OpenPGP implementation for Android.</p>
|
||||
<p>Android Privacy Guard (APG) is an OpenPGP implementation for Android.</p>
|
||||
<p>License: Apache License v2</p>
|
||||
<p>Developer: Thialfihar (Main developer v1.x), Senecaso (QRCode, sign key, upload key), Markus Doits (AIDL), Oliver Runge, Dominik Schürmann (Developer v2.x)</p>
|
||||
|
||||
<h2>Developer</h2>
|
||||
<ul>
|
||||
<li>Thialfihar (Main developer v1.x)</li>
|
||||
<li>Senecaso (QRCode, sign key, upload key)</li>
|
||||
<li>Markus Doits (AIDL)</li>
|
||||
<li>Oliver Runge</li>
|
||||
<li>Dominik Schürmann (Developer v2.x)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Libraries</h2>
|
||||
<p>• <a href="http://actionbarsherlock.com/">ActionBarSherlock</a> (Apache License v2)
|
||||
<br/>• <a href="http://code.google.com/p/zxing/">ZXing QRCode Integration</a> (Apache License v2)
|
||||
<br/>• <a href="https://github.com/rtyley/spongycastle">SpongyCastle</a> (MIT X11 License)
|
||||
<br/>• Icons from <a href="http://rrze-icon-set.berlios.de/">RRZE Icon Set</a> (Creative Commons Attribution Share-Alike licence 3.0)
|
||||
<br/>• Icons from <a href="http://tango.freedesktop.org/">Tango Icon Set</a> (Public Domain)</p>
|
||||
<ul>
|
||||
<li><a href="http://actionbarsherlock.com">ActionBarSherlock</a> (Apache License v2)</li>
|
||||
<li><a href="http://code.google.com/p/zxing/">ZXing QRCode Integration</a> (Apache License v2)</li>
|
||||
<li><a href="http://rtyley.github.com/spongycastle/">SpongyCastle</a> (MIT X11 License)</li>
|
||||
<li><a href="https://github.com/dschuermann/HtmlSpanner">HtmlSpanner Fork</a> (Apache License v2)</li>
|
||||
<li>Icons from <a href="http://rrze-icon-set.berlios.de/">RRZE Icon Set</a> (Creative Commons Attribution Share-Alike licence 3.0)</li>
|
||||
<li>Icons from <a href="http://tango.freedesktop.org/">Tango Icon Set</a> (Public Domain)</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -6,61 +6,81 @@ And don't add newlines before or after p tags because of transifex -->
|
||||
</head>
|
||||
<body>
|
||||
<h2>2.0</h2>
|
||||
<p>* Complete redesign
|
||||
<br/>* Integration of different branches:
|
||||
<br/>* Share public keys via qr codes
|
||||
<br/>* Sign keys
|
||||
<br/>* Upload keys to server</p>
|
||||
<ul>
|
||||
<li>Complete redesign</li>
|
||||
<li>Integration of different branches:</li>
|
||||
<li>Share public keys via qr codes</li>
|
||||
<li>Sign keys</li>
|
||||
<li>Upload keys to server</li>
|
||||
</ul>
|
||||
|
||||
<h2><h2>1.08</h2>
|
||||
<p>* basic key server support
|
||||
<br/>* app2sd (untested, let me know if there are problems)
|
||||
<br/>* more choices for pass phrase cache: 1, 2, 4, 8, hours
|
||||
<br/>* translations: Norwegian (thanks, Sander Danielsen), Chinese (thanks, Zhang Fredrick)
|
||||
<br/>* bugfixes
|
||||
<br/>* optimizations</p>
|
||||
<ul>
|
||||
<li>basic key server support</li>
|
||||
<li>app2sd (untested, let me know if there are problems)</li>
|
||||
<li>more choices for pass phrase cache: 1, 2, 4, 8, hours</li>
|
||||
<li>translations: Norwegian (thanks, Sander Danielsen), Chinese (thanks, Zhang Fredrick)</li>
|
||||
<li>bugfixes</li>
|
||||
<li>optimizations</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.7</h2>
|
||||
<p>* clear sign problem with lacking trailing newline fixed
|
||||
<br/>* more options for pass phrase cache time to live (20, 40, 60 mins)</p>
|
||||
<ul>
|
||||
<li>clear sign problem with lacking trailing newline fixed</li>
|
||||
<li>more options for pass phrase cache time to live (20, 40, 60 mins)</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.6</h2>
|
||||
<p>* account adding crash on Froyo fixed
|
||||
<br/>* secure file deletion
|
||||
<br/>* option to delete key file after import
|
||||
<br/>* stream encryption/decryption (gallery, etc.)
|
||||
<br/>* new options (language, force v3 signatures)
|
||||
<br/>* interface changes
|
||||
<br/>* bugfixes</p>
|
||||
<ul>
|
||||
<li>account adding crash on Froyo fixed</li>
|
||||
<li>secure file deletion</li>
|
||||
<li>option to delete key file after import</li>
|
||||
<li>stream encryption/decryption (gallery, etc.)</li>
|
||||
<li>new options (language, force v3 signatures)</li>
|
||||
<li>interface changes</li>
|
||||
<li>bugfixes</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.5</h2>
|
||||
<p>* German and Italian translation
|
||||
<br/>* much smaller package, due to reduced BC sources
|
||||
<br/>* new preferences GUI
|
||||
<br/>* layout adjustment for localization
|
||||
<br/>* signature bugfix</p>
|
||||
<ul>
|
||||
<li>German and Italian translation</li>
|
||||
<li>much smaller package, due to reduced BC sources</li>
|
||||
<li>new preferences GUI</li>
|
||||
<li>layout adjustment for localization</li>
|
||||
<li>signature bugfix</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.4</h2>
|
||||
<p>* fixed another crash caused by some SDK bug with query builder</p>
|
||||
<ul>
|
||||
<li>fixed another crash caused by some SDK bug with query builder</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.3</h2>
|
||||
<p>* fixed crashes during encryption/signing and possibly key export</p>
|
||||
<ul>
|
||||
<li>fixed crashes during encryption/signing and possibly key export</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.2</h2>
|
||||
<p>* filterable key lists
|
||||
<br/>* smarter preselection of encryption keys
|
||||
<br/>* new Intent handling for VIEW and SEND, allows files to be encrypted/decrypted out of file managers
|
||||
<br/>* fixes and additional features (key preselection) for k9, new beta build available</p>
|
||||
<ul>
|
||||
<li>filterable key lists</li>
|
||||
<li>smarter preselection of encryption keys</li>
|
||||
<li>new Intent handling for VIEW and SEND, allows files to be encrypted/decrypted out of file managers</li>
|
||||
<li>fixes and additional features (key preselection) for k9, new beta build available</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.1</h2>
|
||||
<p>* GMail account listing was broken in 1.0.0, fixed again</p>
|
||||
<ul>
|
||||
<li>GMail account listing was broken in 1.0.0, fixed again</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.0.0</h2>
|
||||
<p>* k9mail integration, APG supporting beta build of k9mail
|
||||
<br/>* support of more file managers (including ASTRO)
|
||||
<br/>* Slovenian translation
|
||||
<br/>* new database, much faster, less memory usage
|
||||
<br/>* defined Intents and content provider for other apps
|
||||
<br/>* bugfixes</p>
|
||||
<ul>
|
||||
<li>k9mail integration, APG supporting beta build of k9mail</li>
|
||||
<li>support of more file managers (including ASTRO)</li>
|
||||
<li>Slovenian translation</li>
|
||||
<li>new database, much faster, less memory usage</li>
|
||||
<li>defined Intents and content provider for other apps</li>
|
||||
<li>bugfixes</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -36,30 +36,17 @@ import android.os.Bundle;
|
||||
public class OtherHelper {
|
||||
|
||||
/**
|
||||
* Reads html files from /res/raw/example.html to output them as string. See
|
||||
* http://www.monocube.com/2011/02/08/android-tutorial-html-file-in-webview/
|
||||
* Gets input stream of raw resource
|
||||
*
|
||||
* @param context
|
||||
* current context
|
||||
* @param resourceID
|
||||
* of html file to read
|
||||
* @return content of html file with formatting
|
||||
* @return input stream of resource
|
||||
*/
|
||||
public static String readContentFromResource(Context context, int resourceID) {
|
||||
public static InputStream getInputStreamFromResource(Context context, int resourceID) {
|
||||
InputStream raw = context.getResources().openRawResource(resourceID);
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
int i;
|
||||
try {
|
||||
i = raw.read();
|
||||
while (i != -1) {
|
||||
stream.write(i);
|
||||
i = raw.read();
|
||||
}
|
||||
raw.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return stream.toString();
|
||||
return raw;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -147,7 +134,7 @@ public class OtherHelper {
|
||||
output[1] = "<" + chunks[1];
|
||||
}
|
||||
output[0] = userId;
|
||||
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,12 @@
|
||||
|
||||
package org.thialfihar.android.apg.ui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.nightwhistler.htmlspanner.HtmlSpanner;
|
||||
import net.nightwhistler.htmlspanner.JellyBeanSpanFixTextView;
|
||||
|
||||
import org.thialfihar.android.apg.Constants;
|
||||
import org.thialfihar.android.apg.R;
|
||||
import org.thialfihar.android.apg.helper.OtherHelper;
|
||||
@ -24,7 +30,6 @@ import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import org.thialfihar.android.apg.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@ -52,15 +57,23 @@ public class HelpFragmentAbout extends SherlockFragment {
|
||||
View view = inflater.inflate(R.layout.help_fragment_about, container, false);
|
||||
|
||||
// load html from html file from /res/raw
|
||||
String aboutText = OtherHelper.readContentFromResource(this.getActivity(), R.raw.help_about);
|
||||
InputStream inputStreamText = OtherHelper.getInputStreamFromResource(this.getActivity(),
|
||||
R.raw.help_about);
|
||||
|
||||
TextView versionText = (TextView) view.findViewById(R.id.help_about_version);
|
||||
versionText.setText(getString(R.string.help_about_version) + " " + getVersion());
|
||||
|
||||
TextView aboutTextView = (TextView) view.findViewById(R.id.help_about_text);
|
||||
JellyBeanSpanFixTextView aboutTextView = (JellyBeanSpanFixTextView) view
|
||||
.findViewById(R.id.help_about_text);
|
||||
|
||||
// load html into textview
|
||||
aboutTextView.setText(Html.fromHtml(aboutText));
|
||||
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);
|
||||
}
|
||||
|
||||
// make links work
|
||||
aboutTextView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
@ -16,18 +16,24 @@
|
||||
|
||||
package org.thialfihar.android.apg.ui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.nightwhistler.htmlspanner.HtmlSpanner;
|
||||
import net.nightwhistler.htmlspanner.JellyBeanSpanFixTextView;
|
||||
|
||||
import org.thialfihar.android.apg.Constants;
|
||||
import org.thialfihar.android.apg.helper.OtherHelper;
|
||||
import org.thialfihar.android.apg.util.Log;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
@ -68,12 +74,13 @@ public class HelpFragmentHtml extends SherlockFragment {
|
||||
htmlFile = getArguments().getInt(ARG_HTML_FILE);
|
||||
|
||||
// load html from html file from /res/raw
|
||||
String helpText = OtherHelper.readContentFromResource(this.getActivity(), htmlFile);
|
||||
InputStream inputStreamText = OtherHelper.getInputStreamFromResource(this.getActivity(),
|
||||
htmlFile);
|
||||
|
||||
mActivity = getActivity();
|
||||
|
||||
ScrollView scroller = new ScrollView(mActivity);
|
||||
TextView text = new TextView(mActivity);
|
||||
JellyBeanSpanFixTextView text = new JellyBeanSpanFixTextView(mActivity);
|
||||
|
||||
// padding
|
||||
int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, mActivity
|
||||
@ -83,7 +90,13 @@ public class HelpFragmentHtml extends SherlockFragment {
|
||||
scroller.addView(text);
|
||||
|
||||
// load html into textview
|
||||
text.setText(Html.fromHtml(helpText));
|
||||
HtmlSpanner htmlSpanner = new HtmlSpanner();
|
||||
htmlSpanner.setStripExtraWhiteSpace(true);
|
||||
try {
|
||||
text.setText(htmlSpanner.fromHtml(inputStreamText));
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "Error while reading raw resources as stream", e);
|
||||
}
|
||||
|
||||
// make links work
|
||||
text.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
Loading…
Reference in New Issue
Block a user