0

I got a RelativeLayout and I'm trying to remove a view from it. I tried removeViewAt and removeView but the view is still there even after I call them. Do you guys know what could be wrong?

RelativeLayout v = (RelativeLayout)findViewById(R.id.container);
Button btn = new Button(this);
v.addView(btn);
v.removeView(btn);
Fernando Valente
  • 1,096
  • 1
  • 8
  • 30

0 Answers0