- TableRow tableRow = null;
- if (result.getChildCount() != 1) {
- result.removeAllViews();
- tableRow = new TableRow(result.getContext());
+ final Entry entry = dictionary.entries.get(row.getIndex());
+ final int rowCount = entry.getRowCount();
+ for (int r = 0; r < rowCount; ++r) {
+ final TableRow tableRow = new TableRow(result.getContext());
+// if (r > 0) {
+// tableRow.setBackgroundColor(Color.DKGRAY);
+// }
+
+ TextView column1 = new TextView(tableRow.getContext());
+ TextView column2 = new TextView(tableRow.getContext());
+ final TableRow.LayoutParams layoutParams = new TableRow.LayoutParams();
+ layoutParams.weight = 0.5f;
+
+ if (r>0){
+ final TextView spacer = new TextView(tableRow.getContext());
+ spacer.setText(r == 0 ? "\95 " : " \95 ");
+ tableRow.addView(spacer);
+ }
+ tableRow.addView(column1, layoutParams);
+ if (r>0){
+ final TextView spacer = new TextView(tableRow.getContext());
+ spacer.setText(r == 0 ? "\95 " : " \95 ");
+ tableRow.addView(spacer);
+ }
+ tableRow.addView(column2, layoutParams);
+
+ column1.setWidth(1);
+ column2.setWidth(1);
+ // column1.setTextAppearance(parent.getContext(), android.R.style.Text);
+
+ // TODO: highlight query word in entries.
+ column1.setText(entry.getAllText(activeLangaugeData.lang)[r]);
+ column2.setText(entry.getAllText(Entry.otherLang(activeLangaugeData.lang))[r]);
+