티스토리 뷰

반응형
SMALL
<androidx.constraintlayout.widget.ConstraintLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content">

    <TextView
      android:id="@+id/tv_1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_margin="20dp"
      android:textSize="20dp"
      android:includeFontPadding="false"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      tools:text="가나다"/>

    <TextView
      android:id="@+id/tv_2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginStart="10dp"
      android:layout_marginLeft="10dp"
      android:includeFontPadding="false"
      app:layout_constraintBottom_toBottomOf="@id/tv_1"
      app:layout_constraintStart_toEndOf="@id/tv_1"
      app:layout_constraintBaseline_toBaselineOf="@id/tv_1"
      tools:text="가나다"/>
    
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintBaseline_toBaselineOf="@id/tv_1"

Baseline 적용 전
Baseline 적용 후

반응형
LIST

'Android > Layout' 카테고리의 다른 글

[ Layout #4 ] DarkTheme 적용하기.  (0) 2020.01.17
댓글