+ private TableLayout getView(HtmlEntry.Row row, ViewGroup parent, final TableLayout result) {\r
+ final Context context = parent.getContext();\r
+ \r
+ final HtmlEntry htmlEntry = row.getEntry();\r
+ \r
+ //final TableRow tableRow = new TableRow(context);\r
+ final LinearLayout tableRow = new LinearLayout(context);\r
+ result.addView(tableRow);\r
+ \r
+ // Text.\r
+ final TextView textView = new TextView(context);\r
+ textView.setText(htmlEntry.title);\r
+ textView.setLayoutParams(new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1.0f));\r
+ tableRow.addView(textView);\r
+ \r
+ // Button.\r
+ final Button button = new Button(context);\r
+ button.setText("open");\r
+ button.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 0.0f));\r
+ tableRow.addView(button);\r
+ \r
+ button.setOnClickListener(new OnClickListener() {\r
+ @Override\r
+ public void onClick(View v) {\r
+ startActivity(HtmlDisplayActivity.getHtmlIntent(String.format("<html><head></head><body>%s</body></html>", htmlEntry.html)));\r
+ }\r
+ });\r
+ \r
+ return result;\r
+ }\r
+ \r