From aec7577b5d025ea0e98d3e919bf41e005a68d6fd Mon Sep 17 00:00:00 2001 From: b1urrrr Date: Fri, 12 May 2023 22:32:38 +0900 Subject: [PATCH] =?UTF-8?q?[UI/#8]=20follower=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=95=84=EC=9B=83=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/sopt/util/binding/BindingAdapter.kt | 11 ++++ app/src/main/res/layout/fragment_follower.xml | 18 ++++--- app/src/main/res/layout/header_follower.xml | 22 ++++++++ app/src/main/res/layout/item_follower.xml | 52 +++++++++++++++++++ .../main/res/layout/item_gallery_image.xml | 9 ++-- app/src/main/res/layout/item_home_repo.xml | 3 +- app/src/main/res/values/strings.xml | 2 +- 7 files changed, 102 insertions(+), 15 deletions(-) create mode 100644 app/src/main/res/layout/header_follower.xml create mode 100644 app/src/main/res/layout/item_follower.xml diff --git a/app/src/main/java/org/android/go/sopt/util/binding/BindingAdapter.kt b/app/src/main/java/org/android/go/sopt/util/binding/BindingAdapter.kt index a4096a1..f2a584e 100644 --- a/app/src/main/java/org/android/go/sopt/util/binding/BindingAdapter.kt +++ b/app/src/main/java/org/android/go/sopt/util/binding/BindingAdapter.kt @@ -17,4 +17,15 @@ object BindingAdapter { transformations(RoundedCornersTransformation(50f)) } } + + @JvmStatic + @BindingAdapter("setCircleImage") + fun ImageView.setCircleImage(img: String?) { + load(img) { + placeholder(R.mipmap.ic_go_sopt) + error(R.drawable.ic_image_not_supported) + fallback(R.drawable.ic_image_not_supported) + transformations(RoundedCornersTransformation(1000f)) + } + } } diff --git a/app/src/main/res/layout/fragment_follower.xml b/app/src/main/res/layout/fragment_follower.xml index 6e0ea78..03dc4e5 100644 --- a/app/src/main/res/layout/fragment_follower.xml +++ b/app/src/main/res/layout/fragment_follower.xml @@ -1,7 +1,7 @@ @@ -13,17 +13,19 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + app:spanCount="2" + tools:listitem="@layout/item_follower" /> \ No newline at end of file diff --git a/app/src/main/res/layout/header_follower.xml b/app/src/main/res/layout/header_follower.xml new file mode 100644 index 0000000..026e3f0 --- /dev/null +++ b/app/src/main/res/layout/header_follower.xml @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_follower.xml b/app/src/main/res/layout/item_follower.xml new file mode 100644 index 0000000..346be79 --- /dev/null +++ b/app/src/main/res/layout/item_follower.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_gallery_image.xml b/app/src/main/res/layout/item_gallery_image.xml index 740c0a9..5c93de6 100644 --- a/app/src/main/res/layout/item_gallery_image.xml +++ b/app/src/main/res/layout/item_gallery_image.xml @@ -1,7 +1,6 @@ - + @@ -10,15 +9,15 @@ + android:layout_height="match_parent"> + app:layout_constraintTop_toTopOf="parent" + tools:src="@drawable/ic_image_not_supported" /> SEARCH FRAGMENT - FOLLOWER FRAGMENT + Followers 이름 : %s