From 851d0f2d6f95bfdcce25d242b85f56053855f36f Mon Sep 17 00:00:00 2001 From: kangmin1012 Date: Sun, 7 Jun 2020 04:51:32 +0900 Subject: [PATCH] #4 in progress 55% --- .idea/workspace.xml | 72 ++++--------------- .../java/org/techtown/homeing/data/GalData.kt | 5 ++ .../org/techtown/homeing/viewholder/GalVH.kt | 17 +++++ 3 files changed, 34 insertions(+), 60 deletions(-) create mode 100644 app/src/main/java/org/techtown/homeing/data/GalData.kt create mode 100644 app/src/main/java/org/techtown/homeing/viewholder/GalVH.kt diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 660fc48..be5ce32 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -10,64 +10,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -261,6 +212,7 @@ - \ No newline at end of file diff --git a/app/src/main/java/org/techtown/homeing/data/GalData.kt b/app/src/main/java/org/techtown/homeing/data/GalData.kt new file mode 100644 index 0000000..436ba4b --- /dev/null +++ b/app/src/main/java/org/techtown/homeing/data/GalData.kt @@ -0,0 +1,5 @@ +package org.techtown.homeing.data + +data class GalData( + val img : String +) \ No newline at end of file diff --git a/app/src/main/java/org/techtown/homeing/viewholder/GalVH.kt b/app/src/main/java/org/techtown/homeing/viewholder/GalVH.kt new file mode 100644 index 0000000..a8dd849 --- /dev/null +++ b/app/src/main/java/org/techtown/homeing/viewholder/GalVH.kt @@ -0,0 +1,17 @@ +package org.techtown.homeing.viewholder + +import android.view.View +import android.widget.ImageView +import androidx.recyclerview.widget.RecyclerView +import com.bumptech.glide.Glide +import kotlinx.android.synthetic.main.search_contents_item.view.* +import org.techtown.homeing.R +import org.techtown.homeing.data.GalData + +class GalVH (view : View) : RecyclerView.ViewHolder(view){ + + val img = view.findViewById(R.id.contents_img) + fun onBind(data : GalData){ + Glide.with(itemView).load(data.img).into(img) + } +} \ No newline at end of file