追å ããããã¥ã¼ã«å¯¾ãã¦ã¯ãRelativeLayout.LayoutParamsãã¯ã©ã¹ã®ãªãã¸ã§ã¯ãã使ã£ã¦å¹ ãé«ããªã©ã®ã¬ã¤ã¢ã¦ãæ å ±ãè¨å®ãã¦ãã¾ããã private final int WC = ViewGroup.LayoutParams.WRAP_CONTENT; Button button = new Button(this); RelativeLayout.LayoutParams rlp = new RelativeLayout.LayoutParams(WC, WC); relativeLayout.addView(button, rlp); ãã®ãã¥ã¼èªèº«ã®ãµã¤ãºã«é¢ããè¨å®ã®ä»ã«ãå¥ã«è¿½å ããããã¥ã¼ã«å¯¾ããä½ç½®é¢ä¿ãè¨å®ãããã¨ãã§ãã¾ãããRelativeLayout.LayoutParamsãã¯ã©ã¹ã§ç¨æããã¦ãããaddRuleãã¡ã½ããã使ãã¾ãã a
{{#tags}}- {{label}}
{{/tags}}