2
나는 다음과 같은 속성을 가진 ConstraintLayout
내부보기 (Linearlayout
)가 단순히 오른쪽 제약 조건을 제거하면됩니다. 그러나 나는 그렇게 할 수 없다./A ConstraintLayout 내부 뷰의 제약 조건을 편집 프로그램
ConstraintLayout.LayoutParams layoutParams = new ConstraintLayout.LayoutParams(holder.myView.getLayoutParams());
holder.myView.setLayoutParams(layoutParams);
하지만 layoutParams
는 항상 설정 빈 매개 변수를 수신하고 왼쪽 상단에보기를 보냅니다
나는 다음을 사용하여 간단하게 복사 및 구속 조건 매개 변수를 적용했습니다. 아마도 이것은 내가 recyclerView
의 내부를 사용하고 있기 때문일 것입니다. 그것은 recyclerView
내부의 모습
: 당신이 그것을 할 방법 PARAMS 레이아웃을 설정할 때 버그 (다음 릴리스에서 수정 될 예정입니다)있다
public void onBindViewHolder(final RecyclerView.ViewHolder basicHolder, int position) {
ProfileAdapter.UserInfoViewHolder holder = (ProfileAdapter.UserInfoViewHolder) basicHolder;
ConstraintLayout.LayoutParams layoutParams = new ConstraintLayout.LayoutParams(holder.myView.getLayoutParams());
holder.myView.setLayoutParams(layoutParams);
}