public void onClick(View v) {
final String html = HtmlEntry.htmlBody(htmlEntries);
startActivity(HtmlDisplayActivity.getHtmlIntent(String.format(
- "<html><head></head><body>%s</body></html>", html)));
+ "<html><head></head><body>%s</body></html>", html), text));
}
});
tableRow.addView(button);
\r
static final String HTML_RES = "html_res";\r
static final String HTML = "html";\r
+ static final String TEXT_TO_HIGHLIGHT = "textToHighlight";\r
\r
public static Intent getHelpLaunchIntent() {\r
final Intent intent = new Intent();\r
return intent;\r
}\r
\r
- public static Intent getHtmlIntent(final String html) {\r
+ public static Intent getHtmlIntent(final String html, final String textToHighlight) {\r
final Intent intent = new Intent();\r
intent.setClassName(HtmlDisplayActivity.class.getPackage().getName(), HtmlDisplayActivity.class.getName());\r
intent.putExtra(HTML, html);\r
+ intent.putExtra(TEXT_TO_HIGHLIGHT, textToHighlight);\r
return intent;\r
}\r
\r
final WebView webView = (WebView) findViewById(R.id.webView);\r
webView.loadData(html, "text/html", "utf-8");\r
\r
+ final String textToHighlight = getIntent().getStringExtra(TEXT_TO_HIGHLIGHT);\r
+ if (textToHighlight != null && "".equals(textToHighlight)) {\r
+ webView.findAllAsync(textToHighlight);\r
+ }\r
+ \r
final Button okButton = (Button) findViewById(R.id.okButton);\r
okButton.setOnClickListener(new OnClickListener() {\r
@Override\r
WIKTIONARY_TITLE_MULTI_DETAIL(false, true, WIKTIONARY_TITLE_SINGLE_DETAIL),
WIKTIONARY_TITLE_MULTI(false, true, WIKTIONARY_TITLE_SINGLE),
WIKTIONARY_TRANSLITERATION(),
+ // How we file "casa {f}, case {pl}" under "case"
WIKTIONARY_INFLECTED_FORM_MULTI(false, true, WIKTIONARY_INFLECTD_FORM_SINGLE),
WIKTIONARY_ENGLISH_DEF_WIKI_LINK(),
WIKTIONARY_ENGLISH_DEF_OTHER_LANG(),
WIKTIONARY_TRANSLATION_WIKI_TEXT(),
WIKTIONARY_TRANSLATION_OTHER_TEXT(),
+ // How we file entries like: "sono: {form of|essere}" under "sono.".
WIKTIONARY_IS_FORM_OF_SOMETHING_ELSE(false, true, null),
MULTIROW_HEAD_MANY_WORDS(),
MULTIROW_TAIL_MANY_WORDS(),
WIKTIONARY_EXAMPLE(),
+ // The next two are how we file entries like: "sono: {form of|essere}" under "essere".
WIKTIONARY_BASE_FORM_SINGLE(), // These two should be eligible for removal if the links are otherwise present.
WIKTIONARY_BASE_FORM_MULTI(false, false, WIKTIONARY_BASE_FORM_SINGLE),
PART_OF_HYPHENATED(),