import android.view.View;\r
import android.view.View.OnClickListener;\r
import android.view.View.OnLongClickListener;\r
+import android.view.ViewGroup.LayoutParams;\r
import android.view.ViewGroup;\r
import android.view.inputmethod.InputMethodManager;\r
import android.widget.AdapterView;\r
}\r
\r
private View getView(PairEntry.Row row, ViewGroup parent, final View convertView) {\r
- final TableLayout result = new TableLayout(parent.getContext());\r
+ final LinearLayout result = new LinearLayout(parent.getContext());\r
final PairEntry entry = row.getEntry();\r
final int rowCount = entry.pairs.size();\r
for (int r = 0; r < rowCount; ++r) {\r
- final TableRow tableRow = new TableRow(result.getContext());\r
+ final LinearLayout tableRow = new LinearLayout(result.getContext());\r
+ final LinearLayout.LayoutParams rowLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\r
+ tableRow.setLayoutParams(rowLayoutParams);\r
\r
final TextView col1 = new TextView(tableRow.getContext());\r
final TextView col2 = new TextView(tableRow.getContext());\r
- final TableRow.LayoutParams layoutParams = new TableRow.LayoutParams();\r
- layoutParams.weight = 0.5f;\r
+ final LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\r
+ layoutParams.weight = 1.0f;\r
\r
// Set the columns in the table.\r
if (r > 0) {\r
tableRow.addView(bullet);\r
}\r
tableRow.addView(col2, layoutParams);\r
- col1.setWidth(1);\r
- col2.setWidth(1);\r
+ col1.setWidth(0);\r
+ col2.setWidth(0);\r
\r
// Set what's in the columns.\r
\r