final int rowCount = entry.pairs.size();
if (result == null) {
result = new TableLayout(context);
+ result.setStretchAllColumns(true);
// 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);
result.removeViews(rowCount, result.getChildCount() - rowCount);
}
- final TableRow.LayoutParams layoutParams = new TableRow.LayoutParams();
- layoutParams.weight = 0.5f;
- layoutParams.leftMargin = mPaddingLarge;
-
for (int r = result.getChildCount(); r < rowCount; ++r) {
+ final TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT);
+ layoutParams.leftMargin = mPaddingLarge;
+
final TableRow tableRow = new TableRow(result.getContext());
final TextView col1 = new TextView(tableRow.getContext());
col1.setTextIsSelectable(true);
col2.setTextIsSelectable(true);
}
+ col1.setTextColor(textColorFg);
+ col2.setTextColor(textColorFg);
// Set the columns in the table.
if (r > 0) {
textView.setOnLongClickListener(indexIndex > 0 ? textViewLongClickListenerIndex1 : textViewLongClickListenerIndex0);
textView.setLongClickable(true);
- // Doesn't work:
- // textView.setTextColor(android.R.color.secondary_text_light);
textView.setTypeface(typeface);
if (isTokenRow) {
textView.setTextAppearance(context, theme.tokenRowFg);
} else {
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSizeSp);
}
+ textView.setTextColor(textColorFg);
if (!htmlEntries.isEmpty()) {
textView.setClickable(true);
textView.setMovementMethod(LinkMovementMethod.getInstance());