I am programmatically adding TextViews to a LinearLayout, and deleting them on touch. It all works fine except when the last TextView is touched it doesn\'t get removed. If
This sounds more of a bug in Android, but one thing you could try is hiding your TextView before removal:
TextView
tv1.setVisibility(View.GONE)
Or alternatively you could add:
linearlayout1.invalidate()
after removal of the last item to trigger redrawing.