Skip to content

Commit

Permalink
Merge pull request #167 from Team-Sopetit/feature/#166-refactoring-ca…
Browse files Browse the repository at this point in the history
…rd-size

#166 [ui] 카드 기기대응 DimensionRatio 적용
  • Loading branch information
pump9918 authored Mar 9, 2024
2 parents a45acaf + dc40b5a commit 36f73bd
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 26 deletions.
14 changes: 9 additions & 5 deletions app/src/main/res/layout/fragment_happy_delete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,25 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_happy_delete_card_front"
android:layout_width="280dp"
android:layout_height="398dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="41dp"
android:background="@drawable/shape_white_fill_gray100_stroke_20_rect"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="@id/btn_happy_delete_clear"
app:layout_constraintDimensionRatio="0.7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_happy_delete_subtitle"
app:layout_constraintVertical_bias="0">

<ImageView
android:id="@+id/iv_happy_delete_card_front"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/ic_happy_card_base"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down Expand Up @@ -126,8 +130,8 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_happy_delete_card_back"
android:layout_width="280dp"
android:layout_height="398dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/shape_white_fill_gray100_stroke_20_rect"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/cl_happy_delete_card_front"
Expand Down
35 changes: 22 additions & 13 deletions app/src/main/res/layout/fragment_happy_my_routine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,25 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_happy_routine_empty_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="40dp"
android:layout_marginTop="53dp"
android:layout_marginEnd="40dp"
android:layout_marginBottom="200dp"
android:layout_marginBottom="127dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="0.7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_happy_routine_default_mention">
app:layout_constraintTop_toBottomOf="@id/iv_happy_routine_default_mention"
app:layout_constraintVertical_bias="0">

<ImageView
android:id="@+id/iv_happy_routine_empty_card"
android:layout_width="280dp"
android:layout_height="398dp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/shape_white_fill_gray000_stroke_radius_20"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -99,7 +104,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="84dp"
android:gravity="center"
android:lineSpacingExtra="4dp"
android:text="@string/happy_empty_card"
android:textColor="@color/gray300"
app:layout_constraintBottom_toTopOf="@id/iv_happy_routine_empty_card_bear"
Expand All @@ -118,7 +122,6 @@
app:layout_constraintTop_toBottomOf="@id/tv_happy_routine_empty_card" />

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
Expand Down Expand Up @@ -192,12 +195,14 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_happy_progress_card_front"
android:layout_width="280dp"
android:layout_height="398dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="41dp"
android:background="@drawable/shape_white_fill_gray100_stroke_20_rect"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="@id/btn_happy_progress_clear"
app:layout_constraintDimensionRatio="0.7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_happy_progress_subtitle"
Expand All @@ -206,9 +211,12 @@
<ImageView
android:id="@+id/iv_happy_progress_card_front"
setHappyCoilImage="@{viewModel.happyProgressResponse.contentImageUrl}"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/ic_happy_card_base"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down Expand Up @@ -243,11 +251,12 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_happy_progress_card_back"
android:layout_width="280dp"
android:layout_height="398dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/shape_white_fill_gray100_stroke_20_rect"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/cl_happy_progress_card_front"
app:layout_constraintDimensionRatio="0.7"
app:layout_constraintEnd_toEndOf="@id/cl_happy_progress_card_front"
app:layout_constraintStart_toStartOf="@id/cl_happy_progress_card_front"
app:layout_constraintTop_toTopOf="@id/cl_happy_progress_card_front">
Expand Down
21 changes: 13 additions & 8 deletions app/src/main/res/layout/fragment_happy_routine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,25 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_happy_routine_empty_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="40dp"
android:layout_marginTop="53dp"
android:layout_marginEnd="40dp"
android:layout_marginBottom="200dp"
android:layout_marginBottom="127dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="0.7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_happy_routine_default_mention">
app:layout_constraintTop_toBottomOf="@id/iv_happy_routine_default_mention"
app:layout_constraintVertical_bias="0">

<ImageView
android:id="@+id/iv_happy_routine_empty_card"
android:layout_width="280dp"
android:layout_height="398dp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/shape_white_fill_gray000_stroke_radius_20"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -80,7 +85,7 @@
style="@style/body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="82dp"
android:layout_marginTop="84dp"
android:gravity="center"
android:text="@string/happy_empty_card"
android:textColor="@color/gray300"
Expand All @@ -93,7 +98,7 @@
android:id="@+id/iv_happy_routine_empty_card_bear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="62dp"
android:layout_marginTop="64dp"
android:src="@drawable/ic_happy_add"
app:layout_constraintEnd_toEndOf="@id/iv_happy_routine_empty_card"
app:layout_constraintStart_toStartOf="@id/iv_happy_routine_empty_card"
Expand Down

0 comments on commit 36f73bd

Please sign in to comment.