method:RelativeLayout.LayoutParams ( ViewGroup.LayoutParams source )
return type:RelativeLayout.LayoutParams
content:ใช้สร้าง Object RelativeLayout.LayoutParams
example:public class AndroidBamboo extends Activity
{
public void onCreate( Bundle savedInstanceState )
{
super.onCreate ( savedInstanceState );
RelativeLayout relative_layout = new RelativeLayout ( this );
Button button = new Button ( this );
button.setText ( "above" );
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams ( relative_layout.getLayoutParams ( ) );
params.addRule ( RelativeLayout.CENTER_VERTICAL );
button.setLayoutParams ( params );
relative_layout.addView ( button );
setContentView( relative_layout );
}
}