Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TextView
- android:id="@+id/textViewChat"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="8dp"
- android:layout_marginLeft="8dp"
- android:layout_marginRight="16dp"
- android:layout_marginStart="8dp"
- android:layout_marginTop="26dp"
- android:background="@drawable/rounded_corner"
- android:fontFamily="serif"
- android:text="I have one listView "
- android:textAlignment="textStart"
- android:textColor="@color/bb_darkBackgroundColor"
- android:textSize="15sp"
- app:layout_constraintHorizontal_bias="0.0"
- app:layout_constraintLeft_toRightOf="@+id/imageViewChat"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintWidth_default="wrap"/>
- protected void onCreate(Bundle savedInstanceState) {
- final ConstraintSet cs = new ConstraintSet();
- ConstraintLayout layout;
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- layout = (ConstraintLayout) findViewById(R.id.constraintLayout);
- cs.clone(this, R.layout.activity_main);
- cs.constrainDefaultWidth(R.id.textViewChat, ConstraintSet.MATCH_CONSTRAINT_SPREAD);
- cs.applyTo(layout);
- }
Add Comment
Please, Sign In to add comment