I have a LinearLayout that I programmatically update with a TableLayout using the code:
public void updateTableView(MyData data){
DataTable dataTable = new DataTable(getApplicationContext(), data);
LinearLayout placeHolder = (LinearLayout) findViewById(R.id.rel_view);
placeHolder.addView(dataTable);
}
(For more background see Android RelativeLayout alignment based on View added programmatically.)
The first time the method updateTableView
is called it works fine. But the LinearLayout seems to be ignoring all subsequent calls. I know this because the data
is different each time but the app is only showing the result of the first call to updateTableView
, i.e. the view is not changing.