Guest User

Untitled

a guest
Jan 15th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <TextView
  2. android:id="@+id/textViewChat"
  3. android:layout_width="0dp"
  4. android:layout_height="wrap_content"
  5. android:layout_marginEnd="8dp"
  6. android:layout_marginLeft="8dp"
  7.  
  8. android:layout_marginRight="16dp"
  9. android:layout_marginStart="8dp"
  10. android:layout_marginTop="26dp"
  11. android:background="@drawable/rounded_corner"
  12. android:fontFamily="serif"
  13. android:text="I have one listView "
  14. android:textAlignment="textStart"
  15. android:textColor="@color/bb_darkBackgroundColor"
  16. android:textSize="15sp"
  17. app:layout_constraintHorizontal_bias="0.0"
  18. app:layout_constraintLeft_toRightOf="@+id/imageViewChat"
  19. app:layout_constraintRight_toRightOf="parent"
  20. app:layout_constraintTop_toTopOf="parent"
  21. app:layout_constraintWidth_default="wrap"/>
  22.  
  23. protected void onCreate(Bundle savedInstanceState) {
  24. final ConstraintSet cs = new ConstraintSet();
  25. ConstraintLayout layout;
  26.  
  27. super.onCreate(savedInstanceState);
  28. setContentView(R.layout.activity_main);
  29.  
  30. layout = (ConstraintLayout) findViewById(R.id.constraintLayout);
  31. cs.clone(this, R.layout.activity_main);
  32. cs.constrainDefaultWidth(R.id.textViewChat, ConstraintSet.MATCH_CONSTRAINT_SPREAD);
  33. cs.applyTo(layout);
  34. }
Add Comment
Please, Sign In to add comment