0
如何從一個LinearLayout複製參數並將其設置爲另一個LinearLayout代碼? 我試圖像如何從一個LinearLayout中複製參數並在代碼中設置爲另一個LinearLayout?
LinearLayout.LayoutParams paramsR=(LinearLayout.LayoutParams) llRight.getLayoutParams();
LinearLayout.LayoutParams paramsL=(LinearLayout.LayoutParams) llLeft.getLayoutParams();
paramsR.height=paramsL.height;
paramsR.width=paramsL.width;
llRight.setLayoutParams(paramsR);
,但它忽略的。如何解決這個問題呢 ?