
I want to create a page like this. these 7 buttons are already exist but if user want to add more cat
LinearLayout mainLayout = (LinearLayout)findViewById(R.id.yourlayoutidthatisonethepicture);
Button addButton =new Button(this);
addButton.setText("add");
mainLayout.addView(addButton);
to remove is the same just change this "mainLayout.addView(addButton)" to removeView or setVisibility of button to View.GONE