java - What is the equivalent of layout_constraintRight_toLeftOf programmatically in android? -




i add constraints textview within constraintlayout programmatically. know had use constraintset, have no idea how add xml attribute: layout_constraintright_toleftof (and equivalencies) on textview in java in android.

any appreciated!!

you can set this,

constraintset constraintset = new constraintset(); constraintset.clone(layout); // root layout  // if want align parent layout left constraintset.connect(textview.getid(), constraintset.left, layout.getid(), constraintset.left);  // if want align left of 1 more textview - second text view constraintset.connect(textview.getid(), constraintset.right, textview1.getid(), constraintset.left);  /*______________________________ |      text1     text2       | |                            |*/ constraintset.applyto(layout); 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -