I want to add some button in a Sliding Drawer’s content, its content is a Relative Layout.
The button will be defined in Java code and the Relative Layout is already defined in xml layout. So, let’s say i want to add 4 buttons:
for (int i=0; i<4; i++) {
Button btn = new Button(this);
btn.setId(i);
btn.setText("some_text");
}
Then i initialize the Relative Layout:
RelativeLayout layout = (RelativeLayout)findViewById(R.id.slidingDrawerContent);
Now how do i add all of the Button into the Relative Layout? Thanks for the help.
or
a bit advance