I have tried everything but my ScrollView doesn't work in my activity. I have activity where after user clicks button opens a table. I can't find a way that my table scrolls bouth ways. How can I make ScrollView programmatically? My code:
TableLayout tableLayout = new TableLayout(getApplicationContext());
tableLayout.setVerticalScrollBarEnabled(true);
tableLayout.setBackgroundColor(Color.WHITE);
TableRow tableRow;
TextView textView,...
tableRow = new TableRow(getApplicationContext());
textView=new TextView(getApplicationContext());
textView.setText("Date");
textView.setTextColor(Color.BLACK);
textView.setTypeface(null, Typeface.BOLD);
textView.setPadding(20, 20, 20, 20);
tableRow.addView(textView);
tableLayout.addView(tableRow);
for (Integer j = 0; j < count; j++)
{
tableRow = new TableRow(getApplicationContext());
textView1 = new TextView(getApplicationContext());
....
tableLayout.addView(tableRow);
c.moveToNext() ;
}
c.close();
setContentView(tableLayout);
database.close();