From c08d11fffb16ef889d76a37df3f2c86e3da084f4 Mon Sep 17 00:00:00 2001 From: Jun Date: Fri, 12 Apr 2024 13:13:40 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[#30]=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=ED=99=94=EB=A9=B4=20RecyclerView=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MungNolZa/app/src/main/AndroidManifest.xml | 10 +- .../data/repository/BoardRepository.kt | 8 ++ .../data/repository/BoardRepositoryImpl.kt | 28 +++++ .../data/repository/UserRepository.kt | 7 ++ .../data/repository/UserRepositoryImpl.kt | 28 +++++ .../kr/co/lion/mungnolza/model/BoardModel.kt | 31 +++-- .../co/lion/mungnolza/model/CommentModel.kt | 10 +- .../kr/co/lion/mungnolza/model/UserModel.kt | 29 ++++- .../mungnolza/ui/freeboard/BoardActivity.kt | 6 +- .../freeboard/adapter/BoardCarouselAdapter.kt | 23 ++++ .../adapter/BoardCarouselViewHolder.kt | 17 +++ .../ShowDetailBoardViewModelFactory.kt | 7 ++ .../fragment/ShowDetailBoardFragment.kt | 112 +++++++++++++----- .../viewmodel/ShowDetailBoardViewModel.kt | 20 ++++ .../res/layout/fragment_show_detail_board.xml | 15 +-- 15 files changed, 287 insertions(+), 64 deletions(-) create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/data/repository/BoardRepository.kt create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/data/repository/BoardRepositoryImpl.kt create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/data/repository/UserRepository.kt create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/data/repository/UserRepositoryImpl.kt create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselViewHolder.kt create mode 100644 MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/factory/ShowDetailBoardViewModelFactory.kt diff --git a/MungNolZa/app/src/main/AndroidManifest.xml b/MungNolZa/app/src/main/AndroidManifest.xml index fb44823..c234354 100644 --- a/MungNolZa/app/src/main/AndroidManifest.xml +++ b/MungNolZa/app/src/main/AndroidManifest.xml @@ -21,6 +21,12 @@ android:name=".ui.TestActivity" android:exported="true" > + + + + + + - - - - , - var boardWriterIdx:Int, - var boardWriteDate:String, - var boardState:Int -){ - constructor():this(0, "", 0, mutableListOf(), 0, "", 0) + var boardIdx: Int, + var boardTitle: String, + var boardContent: String, + var boardImagePathList: MutableList, + var boardWriterIdx: Int, + var boardWriteDate: String, + var boardModifyDate: String, + var boardLikeNumber: Int, + var boardState: Int + +) { + constructor() : this( + boardIdx = 0, + boardTitle = "", + boardContent= "", + boardImagePathList = mutableListOf(), + boardWriterIdx = 0, + boardWriteDate = "", + boardModifyDate = "", + boardLikeNumber = 0, + boardState = 0 + ) } \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/CommentModel.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/CommentModel.kt index 5187caf..b84cd24 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/CommentModel.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/CommentModel.kt @@ -1,4 +1,10 @@ package kr.co.lion.mungnolza.model -class CommentModel { -} \ No newline at end of file +data class CommentModel( + var commentIdx:Int, + var commentContent:String, + var commentDate:String, + var boardIdx:Int, + var writerIdx:Int, + var commentState:Int +) diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt index 41d3bbd..6b53c3a 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt @@ -1,9 +1,26 @@ package kr.co.lion.mungnolza.model data class UserModel( - var userIdx:Int, - var userId:String, - var userPw:String, - var userNickName:String, - var userState:Int -) \ No newline at end of file + + var userIdx: Int, + var userNickname: String, + var userName: String, + var userEmail: String, + var userPhone: String, + var userAddress: String, + var userProfileImgPath: String, + var userAgeRange: String, + var userGender: String, +) { + constructor() : this( + userIdx = 0, + userNickname = "", + userName = "", + userEmail = "", + userPhone = "", + userAddress = "", + userProfileImgPath = "", + userAgeRange = "", + userGender = "" + ) +} \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/BoardActivity.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/BoardActivity.kt index 06e2716..a7c336a 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/BoardActivity.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/BoardActivity.kt @@ -8,6 +8,8 @@ import androidx.fragment.app.FragmentManager import com.google.android.material.transition.MaterialSharedAxis import kr.co.lion.mungnolza.R import kr.co.lion.mungnolza.databinding.ActivityBoardBinding +import kr.co.lion.mungnolza.model.BoardModel +import kr.co.lion.mungnolza.model.UserModel import kr.co.lion.mungnolza.ui.freeboard.fragment.AddBoardFragment import kr.co.lion.mungnolza.ui.main.fragment.FreeBoardFragment import kr.co.lion.mungnolza.ui.freeboard.fragment.ModifyBoardFragment @@ -21,11 +23,13 @@ class BoardActivity : AppCompatActivity() { var oldFragment: Fragment? = null var newFragment: Fragment? = null + + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ActivityBoardBinding.inflate(layoutInflater) - replaceFragment(BoardFragmentName.FREE_BOARD_FRAGMENT,false,false,null) + replaceFragment(BoardFragmentName.SHOW_DETAIL_BOARD_FRAGMENT,false,false,null) setContentView(binding.root) } diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt new file mode 100644 index 0000000..148c773 --- /dev/null +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt @@ -0,0 +1,23 @@ +package kr.co.lion.mungnolza.ui.freeboard.adapter + +import android.view.LayoutInflater +import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView +import kr.co.lion.mungnolza.R +import kr.co.lion.mungnolza.databinding.RowShowDetailBoardBinding + +class BoardCarouselAdapter(): RecyclerView.Adapter() { + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BoardCarouselViewHolder { + return BoardCarouselViewHolder(RowShowDetailBoardBinding.inflate(LayoutInflater.from(parent.context),parent, false)) + } + + // override fun getItemCount(): Int = itemList.size + override fun getItemCount(): Int = 10 + + override fun onBindViewHolder(holder: BoardCarouselViewHolder, position: Int) { + holder.bind() + //holder.bind(itemList[position]) + } + +} \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselViewHolder.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselViewHolder.kt new file mode 100644 index 0000000..978d689 --- /dev/null +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselViewHolder.kt @@ -0,0 +1,17 @@ +package kr.co.lion.mungnolza.ui.freeboard.adapter + +import androidx.recyclerview.widget.RecyclerView +import kr.co.lion.mungnolza.R +import kr.co.lion.mungnolza.databinding.RowShowDetailBoardBinding + +class BoardCarouselViewHolder( + private val binding:RowShowDetailBoardBinding +) :RecyclerView.ViewHolder(binding.root) { + + fun bind(){ + itemView.apply{ + binding.imageViewCarouselShowDetailBoard.setImageResource(R.drawable.img_dog) + } + } + +} \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/factory/ShowDetailBoardViewModelFactory.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/factory/ShowDetailBoardViewModelFactory.kt new file mode 100644 index 0000000..e062d4c --- /dev/null +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/factory/ShowDetailBoardViewModelFactory.kt @@ -0,0 +1,7 @@ +package kr.co.lion.mungnolza.ui.freeboard.factory + +import androidx.lifecycle.ViewModelProvider + +class ShowDetailBoardViewModelFactory : ViewModelProvider.Factory{ + +} \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt index 6173d70..1ffca05 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt @@ -9,25 +9,47 @@ import android.view.ViewGroup import android.view.WindowManager import androidx.databinding.DataBindingUtil import androidx.fragment.app.DialogFragment +import androidx.fragment.app.viewModels +import androidx.lifecycle.ViewModelProvider +import androidx.lifecycle.lifecycleScope import androidx.recyclerview.widget.RecyclerView import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.carousel.CarouselLayoutManager import com.google.android.material.dialog.MaterialAlertDialogBuilder +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.plus import kr.co.lion.mungnolza.R +import kr.co.lion.mungnolza.data.repository.BoardRepository +import kr.co.lion.mungnolza.data.repository.BoardRepositoryImpl +import kr.co.lion.mungnolza.data.repository.UserRepository +import kr.co.lion.mungnolza.data.repository.UserRepositoryImpl import kr.co.lion.mungnolza.databinding.FragmentShowDetailBoardBinding import kr.co.lion.mungnolza.databinding.RowAddBoardBinding import kr.co.lion.mungnolza.databinding.RowShowDetailBoardBinding +import kr.co.lion.mungnolza.model.BoardModel +import kr.co.lion.mungnolza.model.UserModel import kr.co.lion.mungnolza.ui.freeboard.BoardActivity +import kr.co.lion.mungnolza.ui.freeboard.adapter.BoardCarouselAdapter import kr.co.lion.mungnolza.ui.freeboard.viewmodel.ShowDetailBoardViewModel import kr.co.lion.mungnolza.util.BoardFragmentName class ShowDetailBoardFragment : Fragment() { - lateinit var binding: FragmentShowDetailBoardBinding + private var _binding: FragmentShowDetailBoardBinding?= null + private val binding get() = _binding!! + lateinit var boardActivity: BoardActivity - lateinit var showDetailBoardViewModel: ShowDetailBoardViewModel + private val showDetailBoardViewModel by viewModels() + + var userModel: UserModel?= null + var boardModel: BoardModel?= null + + var imagePathList = mutableListOf() + var boardIdx:Int = 0 @@ -35,23 +57,51 @@ class ShowDetailBoardFragment : Fragment() { inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?, ): View? { - binding = DataBindingUtil.inflate(inflater, - R.layout.fragment_show_detail_board,container,false) - showDetailBoardViewModel = ShowDetailBoardViewModel() - binding.showDetailBoardViewModel = showDetailBoardViewModel - binding.lifecycleOwner = this + _binding = FragmentShowDetailBoardBinding.inflate(layoutInflater) boardActivity = activity as BoardActivity - boardIdx = arguments?.getInt("boardIdx")!! + setTest() + + applyUserData() + + + // boardIdx = arguments?.getInt("boardIdx")!! + + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) setToolbar() setCarousel() setCommentButton() - return binding.root } + override fun onDestroy() { + _binding = null + super.onDestroy() + } + + // ---------------------------------------------------------------------------- + + fun setTest(){ + + } + + fun applyUserData(){ + binding.editTextTitleShowDetailBoard.setText(showDetailBoardViewModel.getBoardData().boardTitle) + binding.editTextContentShowDetailBoard.setText(showDetailBoardViewModel.getBoardData().boardContent) + binding.textViewDateShowDetailBoard.text = showDetailBoardViewModel.getBoardData().boardWriteDate + + // 유저 정보는 boardModel로 접근해야 하는데 테스트는 일단 직접 호출 + binding.textViewNickNameShowDetailBoard.text = showDetailBoardViewModel.getUserData().userNickname + + } + + fun setCommentButton(){ binding.apply{ imageViewCommentShowDetailBoard.setOnClickListener { @@ -65,7 +115,7 @@ class ShowDetailBoardFragment : Fragment() { // RecyclerView 셋팅 recyclerViewPhotosShowDetailBoard.apply{ // 어댑터 - adapter = RecyclerViewAdapterShowDetailBoard() + adapter = BoardCarouselAdapter() // 레이아웃 매니저 layoutManager = CarouselLayoutManager() // layoutManager = CarouselLayoutManager(MultiBrowseCarouselStrategy()) @@ -132,25 +182,25 @@ class ShowDetailBoardFragment : Fragment() { bottomCommentFragment.show(boardActivity.supportFragmentManager, "BottomCommentSheet") } - inner class RecyclerViewAdapterShowDetailBoard: RecyclerView.Adapter() { - inner class ViewHolderShowDetailBoard(rowShowDetailBoardBinding: RowShowDetailBoardBinding): RecyclerView.ViewHolder(rowShowDetailBoardBinding.root){ - val rowShowDetailBoardBinding: RowShowDetailBoardBinding - - init{ - this.rowShowDetailBoardBinding = rowShowDetailBoardBinding - } - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolderShowDetailBoard { - val rowShowDetailBoardBinding = RowShowDetailBoardBinding.inflate(layoutInflater) - val viewHolderAddBoard = ViewHolderShowDetailBoard(rowShowDetailBoardBinding) - return viewHolderAddBoard - } - - override fun getItemCount(): Int = 5 - - override fun onBindViewHolder(holder: ViewHolderShowDetailBoard, position: Int) { - holder.rowShowDetailBoardBinding.imageViewCarouselShowDetailBoard.setImageResource(R.drawable.img_dog) - } - } +// inner class RecyclerViewAdapterShowDetailBoard: RecyclerView.Adapter() { +// inner class ViewHolderShowDetailBoard(rowShowDetailBoardBinding: RowShowDetailBoardBinding): RecyclerView.ViewHolder(rowShowDetailBoardBinding.root){ +// val rowShowDetailBoardBinding: RowShowDetailBoardBinding +// +// init{ +// this.rowShowDetailBoardBinding = rowShowDetailBoardBinding +// } +// } +// +// override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolderShowDetailBoard { +// val rowShowDetailBoardBinding = RowShowDetailBoardBinding.inflate(layoutInflater) +// val viewHolderAddBoard = ViewHolderShowDetailBoard(rowShowDetailBoardBinding) +// return viewHolderAddBoard +// } +// +// override fun getItemCount(): Int = 5 +// +// override fun onBindViewHolder(holder: ViewHolderShowDetailBoard, position: Int) { +// holder.rowShowDetailBoardBinding.imageViewCarouselShowDetailBoard.setImageResource(R.drawable.img_dog) +// } +// } } \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt index b0b6350..31a2adf 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt @@ -1,6 +1,26 @@ package kr.co.lion.mungnolza.ui.freeboard.viewmodel import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import kotlinx.coroutines.launch +import kr.co.lion.mungnolza.data.repository.BoardRepository +import kr.co.lion.mungnolza.data.repository.UserRepository +import kr.co.lion.mungnolza.model.BoardModel +import kr.co.lion.mungnolza.model.UserModel +import javax.inject.Inject class ShowDetailBoardViewModel:ViewModel() { + + + + fun getUserData():UserModel{ + return UserModel(1,"카리나","최나연","cny123@naver.com","010-2222-3333","송파에서 제일 비싼 집","","22","여") + } + + fun getBoardData():BoardModel{ + return BoardModel(1,"카리나 어때?","나보다 별로지 않아?\nㅇㅅㅇ", + mutableListOf(),1,"2024-04-12-10:30","2024-04-12-10:48",2,1) + } + + } \ No newline at end of file diff --git a/MungNolZa/app/src/main/res/layout/fragment_show_detail_board.xml b/MungNolZa/app/src/main/res/layout/fragment_show_detail_board.xml index 79f9423..6c55a4b 100644 --- a/MungNolZa/app/src/main/res/layout/fragment_show_detail_board.xml +++ b/MungNolZa/app/src/main/res/layout/fragment_show_detail_board.xml @@ -100,8 +100,7 @@ + android:layout_marginTop="10dp"> + android:focusable="false" + android:textStyle="bold" /> - - + android:layout_marginTop="10dp"> Date: Fri, 12 Apr 2024 13:42:06 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[#30]=20=EA=B9=83=20=EC=B6=A9=EB=8F=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MungNolZa/app/src/main/AndroidManifest.xml | 10 +--------- .../java/kr/co/lion/mungnolza/model/BoardModel.kt | 11 +++++++---- .../java/kr/co/lion/mungnolza/model/UserModel.kt | 13 ++++++------- .../ui/freeboard/adapter/BoardCarouselAdapter.kt | 1 - .../freeboard/fragment/ShowDetailBoardFragment.kt | 1 - .../freeboard/viewmodel/ShowDetailBoardViewModel.kt | 2 -- 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/MungNolZa/app/src/main/AndroidManifest.xml b/MungNolZa/app/src/main/AndroidManifest.xml index c234354..fe19936 100644 --- a/MungNolZa/app/src/main/AndroidManifest.xml +++ b/MungNolZa/app/src/main/AndroidManifest.xml @@ -19,16 +19,8 @@ tools:targetApi="31"> - - - - - - - + android:exported="true" /> - diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/BoardModel.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/BoardModel.kt index b71582f..ad82342 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/BoardModel.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/BoardModel.kt @@ -1,23 +1,26 @@ package kr.co.lion.mungnolza.model +import android.os.Parcelable +import kotlinx.android.parcel.Parcelize + +@Parcelize data class BoardModel( var boardIdx: Int, var boardTitle: String, var boardContent: String, var boardImagePathList: MutableList, - var boardWriterIdx: Int, + var boardWriterIdx: String, var boardWriteDate: String, var boardModifyDate: String, var boardLikeNumber: Int, var boardState: Int - -) { +): Parcelable { constructor() : this( boardIdx = 0, boardTitle = "", boardContent= "", boardImagePathList = mutableListOf(), - boardWriterIdx = 0, + boardWriterIdx = "", boardWriteDate = "", boardModifyDate = "", boardLikeNumber = 0, diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt index 6b53c3a..8da63fb 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/model/UserModel.kt @@ -1,19 +1,18 @@ package kr.co.lion.mungnolza.model data class UserModel( - - var userIdx: Int, + var uniqueNumber: String, var userNickname: String, var userName: String, var userEmail: String, var userPhone: String, var userAddress: String, var userProfileImgPath: String, - var userAgeRange: String, - var userGender: String, -) { - constructor() : this( - userIdx = 0, + var userAgeRange : String, + var userGender: String +){ + constructor(): this( + uniqueNumber = "", userNickname = "", userName = "", userEmail = "", diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt index 148c773..8e6d926 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/adapter/BoardCarouselAdapter.kt @@ -19,5 +19,4 @@ class BoardCarouselAdapter(): RecyclerView.Adapter() { holder.bind() //holder.bind(itemList[position]) } - } \ No newline at end of file diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt index 1ffca05..ad0825c 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/fragment/ShowDetailBoardFragment.kt @@ -65,7 +65,6 @@ class ShowDetailBoardFragment : Fragment() { applyUserData() - // boardIdx = arguments?.getInt("boardIdx")!! return binding.root diff --git a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt index 31a2adf..396809c 100644 --- a/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt +++ b/MungNolZa/app/src/main/java/kr/co/lion/mungnolza/ui/freeboard/viewmodel/ShowDetailBoardViewModel.kt @@ -11,8 +11,6 @@ import javax.inject.Inject class ShowDetailBoardViewModel:ViewModel() { - - fun getUserData():UserModel{ return UserModel(1,"카리나","최나연","cny123@naver.com","010-2222-3333","송파에서 제일 비싼 집","","22","여") }