// Never null.\r
private File wordList = null;\r
private boolean saveOnlyFirstSubentry = false;\r
+ private boolean clickOpensContextMenu = false;\r
\r
// Visible for testing.\r
ListAdapter indexAdapter = null;\r
wordList = new File(prefs.getString(getString(R.string.wordListFileKey),\r
getString(R.string.wordListFileDefault)));\r
saveOnlyFirstSubentry = prefs.getBoolean(getString(R.string.saveOnlyFirstSubentryKey), false);\r
+ clickOpensContextMenu = prefs.getBoolean(getString(R.string.clickOpensContextMenuKey), false);\r
//if (prefs.getBoolean(getString(R.string.vibrateOnFailedSearchKey), true)) {\r
// vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\r
//}\r
\r
@Override\r
protected void onListItemClick(ListView l, View v, int row, long id) {\r
- openContextMenu(v);\r
+ if (clickOpensContextMenu) {\r
+ openContextMenu(v);\r
+ }\r
}\r
\r
void onAppendToWordList(final RowBase row) {\r
}\r
\r
void onCopy(final RowBase row) {\r
+ // Request focus so that if we start typing again, it clears the text input.\r
+ getListView().requestFocus();\r
+\r
Log.d(LOG, "Copy, row=" + row);\r
final StringBuilder result = new StringBuilder();\r
result.append(row.getRawText(false));\r