Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1.1/AN-UI] 특성 화면 및 디테일 반응형 UI 구현하기 #386

Merged
merged 5 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions android/app/src/main/res/layout-land/fragment_ability_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@

<TextView
android:id="@+id/tv_ability_title"
android:layout_width="102dp"
android:layout_height="67dp"
android:layout_width="@dimen/ability_tv_title_width"
android:layout_height="@dimen/ability_tv_title_height"
android:background="@drawable/bg_ability_title"
android:backgroundTint="@color/poke_grey_80"
android:gravity="center"
android:text="@{abilityUiModel.title}"
android:textAppearance="@style/TextAppearance.Poke.TitleBold"
android:textSize="@dimen/ability_tv_title_size"
tools:text="악취" />

<TextView
Expand All @@ -53,6 +53,7 @@
android:gravity="center"
android:text="@{abilityUiModel.description}"
android:textAppearance="@style/TextAppearance.Poke.Description"
android:textSize="@dimen/ability_tv_description_size"
tools:text="특성을 대충 작성한 글입니다~~~~~~~~~~~~~~~~~~~~~~~" />
</LinearLayout>

Expand Down Expand Up @@ -83,5 +84,38 @@
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="45dp" />


<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ability_detail_loading"
visible="@{vm.isEmpty()}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:layout_width="170dp"
android:layout_height="170dp"
android:layout_marginBottom="10dp"
android:src="@drawable/ic_network_error"
app:layout_constraintBottom_toTopOf="@id/tv_empty"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="ContentDescription" />

<TextView
android:id="@+id/tv_empty"
style="@style/TextAppearance.Poke.TitleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="해당하는 포켓몬이 없습니다"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
tools:listitem="@layout/item_ability_detail_pokemon" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/dex_loading"
android:id="@+id/ability_detail_loading"
visible="@{vm.isEmpty()}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
9 changes: 5 additions & 4 deletions android/app/src/main/res/layout/item_ability_description.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@

<TextView
android:id="@+id/tv_ability_title"
android:layout_width="102dp"
android:layout_height="67dp"
android:layout_width="@dimen/ability_tv_title_width"
android:layout_height="@dimen/ability_tv_title_height"
android:background="@drawable/bg_ability_title"
android:backgroundTint="@color/poke_grey_80"
android:gravity="center"
android:text="@{ability.title}"
android:textAppearance="@style/TextAppearance.Poke.TitleBold"
android:textSize="@dimen/ability_tv_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -47,9 +47,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="29dp"
android:ellipsize="end"
android:maxLines="@{ability.shortening ? 3 : Integer.MAX_VALUE}"
android:maxLines="@{ability.shortening ? 1 : Integer.MAX_VALUE}"
android:text="@{ability.description}"
android:textAppearance="@style/TextAppearance.Poke.Description"
android:textSize="@dimen/ability_tv_description_size"
app:layout_constraintBottom_toBottomOf="@+id/tv_ability_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_ability_title"
Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/res/values-sw600dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
<dimen name="home_tv_size">24sp</dimen>
<dimen name="home_gridLayout_padding">100dp</dimen>

<!-- ability screen -->
<dimen name="ability_tv_title_width">153dp</dimen>
<dimen name="ability_tv_title_height">100dp</dimen>
<dimen name="ability_tv_title_size">20sp</dimen>
<dimen name="ability_tv_description_size">20sp</dimen>

</resources>
5 changes: 5 additions & 0 deletions android/app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
<dimen name="home_tv_size">15sp</dimen>
<dimen name="home_gridLayout_padding">20dp</dimen>

<!-- ability screen -->
<dimen name="ability_tv_title_width">102dp</dimen>
<dimen name="ability_tv_title_height">67dp</dimen>
<dimen name="ability_tv_title_size">15sp</dimen>
<dimen name="ability_tv_description_size">15sp</dimen>

</resources>
Loading