How to utilise seperate ConstraintSet actions for different TextViews in the same ConstraintLayout?
How to utilise seperate ConstraintSet actions for different TextViews in the same ConstraintLayout? My question follows on from this question: Android : How to programatically set layout_constraintRight_toRightOf "parent". I have the written the following code that should constrain the new TextView to either the left (btnSendL) or the right (btnSendR) of a ConstraintLayout. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ConstraintLayout clMessagesContainer = (ConstraintLayout) findViewById(R.id.clMessagesContainer); final EditText txtMessage = (EditText) findViewById(R.id.txtMessage); Button btnSendL = (Button) findViewById(R.id.btnSendL); Button btnSendR = (Button) findViewById(R.id.btnSendR); btnSendL.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { TextView lblNxtMessage =...