Change Guideline percentage in constraint layout programmatically

后端 未结 6 1165
你的背包
你的背包 2021-02-04 23:25

I have a guideline in constraint layout like this



        
6条回答
  •  天涯浪人
    2021-02-05 00:16

    This code will change you guidePercent to 0

    ConstraintLayout.LayoutParams lp = (ConstraintLayout.LayoutParams) guideline.getLayoutParams();
    lp.guidePercent = 0;
    guideline.setLayoutParams(lp);
    

提交回复
热议问题