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
Post a Comment