I\'m trying to add views dynamically to a linearlayout. I see through getChildCount() that the views are added to the layout, but even calling invalidate() on the layout doe
I spent a lot of time to solve this problem too. And I found a simple method of refresh LinearLayout in 3 lines of code
You must set transperent color in style.xml
#00000000
And in the code just call to set background
LinearLayout ll = (LinearLayout) findViewById(R.id.noteList);
ll.setBackgroundColor(getResources().getColor(R.color.transparent));
ll.invalidate();
If you has drawable background call
ll.setBackgroundResource(R.drawable.your_drawable);