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_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_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_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_label">read Email attachments</string>
|
||||||
<string name="read_attachment_desc">Allows this application to read your 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;
|
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()
|
private void onAbout()
|
||||||
{
|
{
|
||||||
String appName = getString(R.string.app_name);
|
String appName = getString(R.string.app_name);
|
||||||
|
String year = "2011";
|
||||||
WebView wv = new WebView(this);
|
WebView wv = new WebView(this);
|
||||||
String html = "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />" +
|
StringBuilder html = new StringBuilder()
|
||||||
"<img src=\"file:///android_res/drawable/icon.png\" alt=\""+appName+"\" />" +
|
.append("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />")
|
||||||
"<h1>" + String.format(getString(R.string.about_title_fmt),
|
.append("<img src=\"icon.png\" alt=\"").append(appName).append("\"/>")
|
||||||
"<a href=\"" + getString(R.string.app_webpage_url) + "\">" + appName + "</a>") + "</h1>" +
|
.append("<h1>")
|
||||||
"<p>" + appName + " " +
|
.append(String.format(getString(R.string.about_title_fmt),
|
||||||
String.format(getString(R.string.debug_version_fmt),
|
"<a href=\"" + getString(R.string.app_webpage_url)) + "\">")
|
||||||
getVersionNumber()) + "</p>" +
|
.append(appName)
|
||||||
"<p>" + String.format(getString(R.string.app_authors_fmt),
|
.append("</a>")
|
||||||
getString(R.string.app_authors)) + "</p>" +
|
.append("</h1><p>")
|
||||||
"<p>" + String.format(getString(R.string.app_revision_fmt),
|
.append(appName)
|
||||||
"<a href=\"" + getString(R.string.app_revision_url) + "\">" +
|
.append(" ")
|
||||||
getString(R.string.app_revision_url) + "</a></p>" +
|
.append(String.format(getString(R.string.debug_version_fmt), getVersionNumber()))
|
||||||
"<hr/><p>" + String.format(getString(R.string.app_copyright_fmt), "2011","2011")+ "</p>" +
|
.append("</p><p>")
|
||||||
"<hr/><p>" + getString(R.string.app_license) + "</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.loadDataWithBaseURL("file:///android_res/drawable/", html.toString(), "text/html", "utf-8", null);
|
||||||
wv.loadData(html, "text/html", "utf-8");
|
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setView(wv)
|
.setView(wv)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user