2013-01-10 76 views

回答

3

試試這個:

((ViewGroup)view.getParent()).removeView(view); 
1

使用removeView(View view)

View viewToRemove = ... 
ViewGroup myViewGroup = (ViewGroup) viewToRemove.getParent(); 
myViewGroup.removeView(viewToRemove); 
相關問題