나는 동적으로 라이너 레이아웃을 만들려고 노력하고 두 가지 버텀을 만들었습니다.오른쪽과 왼쪽을 하나씩 넣는 법
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.HORIZONTAL);
layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT));
TextView titleView = new TextView(this);
titleView.setWidth(LayoutParams.WRAP_CONTENT);
titleView.setHeight(LayoutParams.WRAP_CONTENT);
titleView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
titleView.setText("Hallo Welt!");
layout.addView(titleView);
Button btnConnect = new Button(this);
btnConnect.setText("Connect");
layout.addView(btnConnect);
Button btnDisconnect = new Button(this);
btnDisconnect.setText("Disconnect");
layout.addView(btnDisconnect);
연결 단추를 왼쪽 모서리에 놓고 오른쪽 모서리에 disconnet 단추를 넣으 려합니다. 내가 어떻게 할 수 있니?