tags:

views:

81

answers:

2

dynamically i am creating the linear layout and adding the views to linear layout every 5 sec i need to update data to linear layout from db when i check logger output it is adding to linear layout but gui it is not updating for every 5 sec updation i am using scheduleatfixed timer task

+1  A: 

If you want to visualize data in your application, you should adapt this data to the UI component that will display it. LinearLayout doesn't sound like a good choice for what you are trying to do.

Most often, in Android this is done by using a subclass of BaseAdapter and displaying the data in a subclass of AdapterView. Changes in the adapted data should be handled by the adapter, and the UI component should be updated accordingly.

If you are using SQLite database, take a look at the classes Cursor and CursorAdapter.

Dimitar Dimitrov
thank you very much
A: 

I agree w/ the other answer from Dimitar that you probably don't want to do this with a linear layout.

However if you must, are you calling invalidate() on the LinearLayout after adding a new view to it?

dweebo
thank you very much