mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-11 13:49:15 -05:00
Add credits for third-party libraries and emoji icons to about box
This commit is contained in:
parent
88d0af16a5
commit
555e6431b2
@ -9,6 +9,8 @@
|
||||
<string name="app_revision_url">http://code.google.com/p/k9mail/wiki/ReleaseNotes</string>
|
||||
<string name="app_revision_fmt">Revision Information: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="app_webpage_url">http://code.google.com/p/k9mail/</string>
|
||||
<string name="app_libraries">We\'re using the following third-party libraries: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
<string name="app_emoji_icons">Emoji icons: <xliff:g id="app_emoji_icons_link">%s</xliff:g></string>
|
||||
|
||||
<string name="read_attachment_label">read Email attachments</string>
|
||||
<string name="read_attachment_desc">Allows this application to read your Email attachments.</string>
|
||||
|
@ -819,29 +819,60 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
return true;
|
||||
}
|
||||
|
||||
private static String[][] USED_LIBRARIES = new String[][] {
|
||||
new String[] {"jutf7", "http://jutf7.sourceforge.net/"},
|
||||
new String[] {"JZlib", "http://www.jcraft.com/jzlib/"},
|
||||
new String[] {"Commons IO", "http://commons.apache.org/io/"},
|
||||
new String[] {"Mime4j", "http://james.apache.org/mime4j/"},
|
||||
};
|
||||
|
||||
private void onAbout()
|
||||
{
|
||||
String appName = getString(R.string.app_name);
|
||||
String year = "2011";
|
||||
WebView wv = new WebView(this);
|
||||
String html = "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />" +
|
||||
"<img src=\"file:///android_res/drawable/icon.png\" alt=\""+appName+"\" />" +
|
||||
"<h1>" + String.format(getString(R.string.about_title_fmt),
|
||||
"<a href=\"" + getString(R.string.app_webpage_url) + "\">" + appName + "</a>") + "</h1>" +
|
||||
"<p>" + appName + " " +
|
||||
String.format(getString(R.string.debug_version_fmt),
|
||||
getVersionNumber()) + "</p>" +
|
||||
"<p>" + String.format(getString(R.string.app_authors_fmt),
|
||||
getString(R.string.app_authors)) + "</p>" +
|
||||
"<p>" + String.format(getString(R.string.app_revision_fmt),
|
||||
"<a href=\"" + getString(R.string.app_revision_url) + "\">" +
|
||||
getString(R.string.app_revision_url) + "</a></p>" +
|
||||
"<hr/><p>" + String.format(getString(R.string.app_copyright_fmt), "2011","2011")+ "</p>" +
|
||||
"<hr/><p>" + getString(R.string.app_license) + "</p>"
|
||||
StringBuilder html = new StringBuilder()
|
||||
.append("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />")
|
||||
.append("<img src=\"icon.png\" alt=\"").append(appName).append("\"/>")
|
||||
.append("<h1>")
|
||||
.append(String.format(getString(R.string.about_title_fmt),
|
||||
"<a href=\"" + getString(R.string.app_webpage_url)) + "\">")
|
||||
.append(appName)
|
||||
.append("</a>")
|
||||
.append("</h1><p>")
|
||||
.append(appName)
|
||||
.append(" ")
|
||||
.append(String.format(getString(R.string.debug_version_fmt), getVersionNumber()))
|
||||
.append("</p><p>")
|
||||
.append(String.format(getString(R.string.app_authors_fmt),
|
||||
getString(R.string.app_authors)))
|
||||
.append("</p><p>")
|
||||
.append(String.format(getString(R.string.app_revision_fmt),
|
||||
"<a href=\"" + getString(R.string.app_revision_url) + "\">" +
|
||||
getString(R.string.app_revision_url) +
|
||||
"</a>"))
|
||||
.append("</p><hr/><p>")
|
||||
.append(String.format(getString(R.string.app_copyright_fmt), year, year))
|
||||
.append("</p><hr/><p>")
|
||||
.append(getString(R.string.app_license))
|
||||
.append("</p><hr/><p>");
|
||||
|
||||
StringBuilder libs = new StringBuilder().append("<ul>");
|
||||
for (String[] library : USED_LIBRARIES)
|
||||
{
|
||||
libs.append("<li><a href=\"" + library[1] + "\">" + library[0] + "</a></li>");
|
||||
}
|
||||
libs.append("</ul>");
|
||||
|
||||
html.append(String.format(getString(R.string.app_libraries), libs.toString()))
|
||||
.append("</p><hr/><p>")
|
||||
.append(String.format(getString(R.string.app_emoji_icons),
|
||||
"<div>TypePad \u7d75\u6587\u5b57\u30a2\u30a4\u30b3\u30f3\u753b\u50cf " +
|
||||
"(<a href=\"http://typepad.jp/\">Six Apart Ltd</a>) / " +
|
||||
"<a href=\"http://creativecommons.org/licenses/by/2.1/jp/\">CC BY 2.1</a></div>"))
|
||||
.append("</p>");
|
||||
|
||||
);
|
||||
wv.loadData(html, "text/html", "utf-8");
|
||||
wv.loadDataWithBaseURL("file:///android_res/drawable/", html.toString(), "text/html", "utf-8", null);
|
||||
new AlertDialog.Builder(this)
|
||||
.setView(wv)
|
||||
.setCancelable(true)
|
||||
|
Loading…
Reference in New Issue
Block a user