본문 바로가기
프로그래밍/App 개발

[Android] ConstraintLayout: spread, spread_inside

by 엽기토기 2024. 6. 5.
반응형

spread

<include
    android:id="@+id/habit_repeat_setting_dayofweek_sunday"
    layout="@layout/habit_repeat_dayofweek_card"
    android:layout_width="40dp"
    android:layout_height="40dp"
    app:dayOfWeek="@{DayOfWeek.SUNDAY}"
    app:isSelected="@{parentVm.habit.dayOfWeek.contains(DayOfWeek.SUNDAY)}"
    app:layout_constraintEnd_toStartOf="@+id/habit_repeat_setting_dayofweek_monday"
    app:layout_constraintHorizontal_chainStyle="spread_inside"
    app:layout_constraintStart_toStartOf="parent"
    app:listener="@{parentVm}" />


spread_inside

<include
    android:id="@+id/habit_repeat_setting_dayofweek_sunday"
    layout="@layout/habit_repeat_dayofweek_card"
    android:layout_width="40dp"
    android:layout_height="40dp"
    app:dayOfWeek="@{DayOfWeek.SUNDAY}"
    app:isSelected="@{parentVm.habit.dayOfWeek.contains(DayOfWeek.SUNDAY)}"
    app:layout_constraintEnd_toStartOf="@+id/habit_repeat_setting_dayofweek_monday"
    app:layout_constraintHorizontal_chainStyle="spread_inside"
    app:layout_constraintStart_toStartOf="parent"
    app:listener="@{parentVm}" />

반응형