final Button button = new Button(listView.getContext());
final String name = getString(R.string.dictionaryManager);
button.setText(name);
final Button button = new Button(listView.getContext());
final String name = getString(R.string.dictionaryManager);
button.setText(name);
{
final MenuItem dictionaryManager = menu.add(getString(R.string.dictionaryManager));
MenuItemCompat.setShowAsAction(dictionaryManager, MenuItem.SHOW_AS_ACTION_NEVER);
{
final MenuItem dictionaryManager = menu.add(getString(R.string.dictionaryManager));
MenuItemCompat.setShowAsAction(dictionaryManager, MenuItem.SHOW_AS_ACTION_NEVER);
final Context context = getListView().getContext();
final Dialog dialog = new Dialog(context);
dialog.setContentView(R.layout.about_dictionary_dialog);
final Context context = getListView().getContext();
final Dialog dialog = new Dialog(context);
dialog.setContentView(R.layout.about_dictionary_dialog);
if (clickOpensContextMenu && (row instanceof HtmlEntry.Row ||
(row instanceof TokenRow && ((TokenRow)row).getIndexEntry().htmlEntries.size() > 0))) {
final List<HtmlEntry> html = row instanceof TokenRow ? ((TokenRow)row).getIndexEntry().htmlEntries : Collections.singletonList(((HtmlEntry.Row)row).getEntry());
if (clickOpensContextMenu && (row instanceof HtmlEntry.Row ||
(row instanceof TokenRow && ((TokenRow)row).getIndexEntry().htmlEntries.size() > 0))) {
final List<HtmlEntry> html = row instanceof TokenRow ? ((TokenRow)row).getIndexEntry().htmlEntries : Collections.singletonList(((HtmlEntry.Row)row).getEntry());
final MenuItem open = menu.add("Open");
open.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
final MenuItem open = menu.add("Open");
open.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
// Because we have a Button inside a ListView row:
// http://groups.google.com/group/android-developers/browse_thread/thread/3d96af1530a7d62a?pli=1
result.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
// Because we have a Button inside a ListView row:
// http://groups.google.com/group/android-developers/browse_thread/thread/3d96af1530a7d62a?pli=1
result.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
final TableRow tableRow = new TableRow(result.getContext());
final TextView col1 = new TextView(tableRow.getContext());
final TableRow tableRow = new TableRow(result.getContext());
final TextView col1 = new TextView(tableRow.getContext());
textView.setOnLongClickListener(indexIndex > 0 ? textViewLongClickListenerIndex1 : textViewLongClickListenerIndex0);
textView.setLongClickable(true);
textView.setOnLongClickListener(indexIndex > 0 ? textViewLongClickListenerIndex1 : textViewLongClickListenerIndex0);
textView.setLongClickable(true);
textView.setTypeface(typeface);
if (isTokenRow) {
textView.setTextAppearance(context, theme.tokenRowFg);
textView.setTypeface(typeface);
if (isTokenRow) {
textView.setTextAppearance(context, theme.tokenRowFg);
if (!htmlEntries.isEmpty()) {
textView.setClickable(true);
textView.setMovementMethod(LinkMovementMethod.getInstance());
if (!htmlEntries.isEmpty()) {
textView.setClickable(true);
textView.setMovementMethod(LinkMovementMethod.getInstance());
final Dialog dialog = new Dialog(getListView().getContext());
dialog.setContentView(R.layout.thadolina_dialog);
dialog.setTitle("Ti amo, amore mio!");
final Dialog dialog = new Dialog(getListView().getContext());
dialog.setContentView(R.layout.thadolina_dialog);
dialog.setTitle("Ti amo, amore mio!");