From 1023602b156658557db0fb3c79d15bf86b56da15 Mon Sep 17 00:00:00 2001 From: leesuwon0673 Date: Mon, 15 Apr 2024 17:52:42 +0900 Subject: [PATCH 01/52] =?UTF-8?q?=E2=9C=A8=20Add=20CropModel=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CropModel 및 dao패키지 만들고 CropDao생성 Related to : #45 --- .../java/kr/co/lion/farming_customer/Tools.kt | 7 +++++++ .../kr/co/lion/farming_customer/dao/CropDao.kt | 11 +++++++++++ .../co/lion/farming_customer/model/CropModel.kt | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/CropDao.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/CropModel.kt diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt index a72b35a..7c04a2b 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt @@ -282,4 +282,11 @@ enum class PaymentFragmentName(var str:String){ PAYMENT_SUCCESS_FRAGMENT("PaymentSuccessFragment"), PAYMENT_FAIL_FRAGMENT("PaymentFailFragment"), PAYMENT_DELIVERY_ADDRESS_FRAGMENT("PaymentDeliveryAddressFragment") +} + +// 농산품 상태 +enum class CropStatus(var str:String, var num:Int){ + NORMAL("정상", 1), + PAUSE("판매품 일시정지",2), + DELETE("판매품 삭제",3) } \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/CropDao.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/CropDao.kt new file mode 100644 index 0000000..e4b2136 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/CropDao.kt @@ -0,0 +1,11 @@ +package kr.co.lion.farming_customer.dao + +import com.google.firebase.Firebase +import com.google.firebase.firestore.firestore +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch + +class CropDao { + +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/CropModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/CropModel.kt new file mode 100644 index 0000000..8635d58 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/CropModel.kt @@ -0,0 +1,16 @@ +package kr.co.lion.farming_customer.model + +data class CropModel( + var cropIdx:Int, var cropSellerIdx:Int, + var cropTitle:String, var cropOptionDetail:MutableList>, + var cropContentDetail:String, var cropContentWarning:String, + var cropContentPolicy:String, var cropLikeCnt:Int, + var cropImages:MutableList, var cropContentDetailImage:MutableList, + var cropStatus:Int) { + + constructor(): this( + 0,0,"", + mutableListOf(),"", "", + "",0, mutableListOf(), + mutableListOf(), 0) +} \ No newline at end of file From f97a78bd5953d5b619c82ca6e5c9389f4a345b06 Mon Sep 17 00:00:00 2001 From: inwoong <525inwung@gmail.com> Date: Tue, 16 Apr 2024 09:34:27 +0900 Subject: [PATCH 02/52] =?UTF-8?q?:sparkles:=20Add=20=ED=99=88=20=EC=A3=BC?= =?UTF-8?q?=EB=A7=90=EB=86=8D=EC=9E=A5/=EC=B2=B4=ED=97=98=ED=99=9C?= =?UTF-8?q?=EB=8F=99=20=ED=8C=8C=EC=9D=B4=EC=96=B4=EB=B2=A0=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to : #47 --- farming_customer/app/build.gradle.kts | 3 +- .../java/kr/co/lion/farming_customer/Tools.kt | 6 + .../co/lion/farming_customer/dao/FarmDao.kt | 118 ++++++++++++++++++ .../farming_customer/fragment/HomeFragment.kt | 42 ++++++- .../farminLifeFarmAndActivity/FarmModel.kt | 47 +++++++ .../app/src/main/res/drawable/heart_04.xml | 14 +++ .../app/src/main/res/layout/row_grid_item.xml | 2 +- 7 files changed, 224 insertions(+), 8 deletions(-) create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/FarmDao.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/farminLifeFarmAndActivity/FarmModel.kt create mode 100644 farming_customer/app/src/main/res/drawable/heart_04.xml diff --git a/farming_customer/app/build.gradle.kts b/farming_customer/app/build.gradle.kts index 436bf29..e7e9004 100644 --- a/farming_customer/app/build.gradle.kts +++ b/farming_customer/app/build.gradle.kts @@ -51,7 +51,6 @@ dependencies { testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - implementation ("de.hdodenhof:circleimageview:3.1.0") implementation ("com.github.ome450901:SimpleRatingBar:1.5.1") implementation ("com.github.amarjain07:StickyScrollView:1.0.3") implementation ("me.relex:circleindicator:2.1.6") @@ -65,4 +64,6 @@ dependencies { implementation("com.google.firebase:firebase-firestore:24.11.1") implementation("com.google.firebase:firebase-storage:20.3.0") + implementation("com.github.bumptech.glide:glide:4.16.0") + } \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt index a72b35a..361857a 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/Tools.kt @@ -282,4 +282,10 @@ enum class PaymentFragmentName(var str:String){ PAYMENT_SUCCESS_FRAGMENT("PaymentSuccessFragment"), PAYMENT_FAIL_FRAGMENT("PaymentFailFragment"), PAYMENT_DELIVERY_ADDRESS_FRAGMENT("PaymentDeliveryAddressFragment") +} + +enum class FarmStatus(var str : String, var number : Int){ + FARM_STATUS_NORMAL("정상", 1), + FARM_STATUS_PAUSE("일시중지", 2), + FARM_STATUS_DELETE("삭제", 3) } \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/FarmDao.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/FarmDao.kt new file mode 100644 index 0000000..cf685c0 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/dao/FarmDao.kt @@ -0,0 +1,118 @@ +package kr.co.lion.farming_customer.dao + +import android.content.Context +import android.view.View +import android.widget.ImageView +import com.bumptech.glide.Glide +import com.google.firebase.Firebase +import com.google.firebase.firestore.Query +import com.google.firebase.firestore.firestore +import com.google.firebase.storage.storage +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.tasks.await +import kr.co.lion.farming_customer.FarmStatus +import kr.co.lion.farming_customer.model.farminLifeFarmAndActivity.FarmModel + +class FarmDao { + companion object{ + // 주말 농장 번호 시퀀스값을 가져온다. + suspend fun getFarmSequence():Int{ + + var farmSequence = -1 + + val job1 = CoroutineScope(Dispatchers.IO).launch { + // 컬렉션에 접근할 수 있는 객체를 가져온다. + val collectionReference = Firebase.firestore.collection("Sequence") + // 게시글 번호 시퀀스 값을 가지고 있는 문서에 접근할 수 있는 객체를 가져온다. + val documentReference = collectionReference.document("FarmSequence") + // 문서내에 있는 데이터를 가져올 수 있는 객체를 가져온다. + val documentSnapShot = documentReference.get().await() + farmSequence = documentSnapShot.getLong("value")?.toInt()!! + } + job1.join() + + return farmSequence + } + + // 게시글 시퀀스 값을 업데이트 한다. + suspend fun updateFarmSequence(farmSequence:Int){ + val job1 = CoroutineScope(Dispatchers.IO).launch { + // 컬렉션에 접근할 수 있는 객체를 가져온다. + val collectionReference = Firebase.firestore.collection("Sequence") + // 게시글 번호 시퀀스 값을 가지고 있는 문서에 접근할 수 있는 객체를 가져온다. + val documentReference = collectionReference.document("FarmSequence") + // 저장할 데이터를 담을 HashMap을 만들어준다. + val map = mutableMapOf() + map["value"] = farmSequence.toLong() + // 저장한다. + documentReference.set(map) + } + job1.join() + } + + // 주말농장 목록을 가져온다. + suspend fun gettingFarmList():MutableList{ + // 게시글 정보를 담을 리스트 + val farmList = mutableListOf() + + val job1 = CoroutineScope(Dispatchers.IO).launch { + // 컬렉션에 접근할 수 있는 객체를 가져온다. + val collectionReference = Firebase.firestore.collection("FarmData") + // 게시글 상태가 정상 상태이고 게시글 번호를 기준으로 내림차순 정렬되게 데이터를 가져올 수 있는 + // Query를 생성한다. + // 게시글 상태가 정상 상태인 것만.. + var query = collectionReference.whereEqualTo("farm_status", FarmStatus.FARM_STATUS_NORMAL.number) + // 게시글 번호를 기준으로 내림 차순 정렬.. + query = query.orderBy("farm_idx", Query.Direction.DESCENDING) + + val queryShapshot = query.get().await() + // 가져온 문서의 수 만큼 반복한다. + queryShapshot.forEach { + // 현재 번째의 문서를 객체로 받아온다. + val farmModel = it.toObject(FarmModel::class.java) + // 객체를 리스트에 담는다. + farmList.add(farmModel) + } + + } + job1.join() + + return farmList + } + + // 게시글 정보를 저장한다. + suspend fun insertFarmData(farmModel: FarmModel){ + val job1 = CoroutineScope(Dispatchers.IO).launch { + // 컬렉션에 접근할 수 있는 객체를 가져온다. + val collectionReference = Firebase.firestore.collection("FarmData") + // 컬럭션에 문서를 추가한다. + // 문서를 추가할 때 객체나 맵을 지정한다. + // 추가된 문서 내부의 필드는 객체가 가진 프로퍼티의 이름이나 맵에 있는 데이터의 이름과 동일하게 결정된다. + collectionReference.add(farmModel) + } + job1.join() + } + + // 이미지 데이터를 받아오는 메서드 + suspend fun gettingContentImage(context: Context, imageFileName:String, imageView: ImageView){ + val job1 = CoroutineScope(Dispatchers.IO).launch { + // 이미지에 접근할 수 있는 객체를 가져온다. + val storageRef = Firebase.storage.reference.child(imageFileName) + // 이미지의 주소를 가지고 있는 Uri 객체를 받아온다. + val imageUri = storageRef.downloadUrl.await() + // 이미지 데이터를 받아와 이미지 뷰에 보여준다. + CoroutineScope(Dispatchers.Main).launch { + Glide.with(context).load(imageUri).into(imageView) + } + } + job1.join() + + // 이미지는 용량이 매우 클 수 있다. 즉 이미지 데이터를 내려받는데 시간이 오래걸릴 수도 있다. + // 이에, 이미지 데이터를 받아와 보여주는 코루틴을 작업이 끝날 때 까지 대기 하지 않는다. + // 그 이유는 데이터를 받아오는데 걸리는 오랜 시간 동안 화면에 아무것도 나타나지 않을 수 있기 때문이다. + // 따라서 이 메서드는 제일 마지막에 호출해야 한다.(다른 것들을 모두 보여준 후에...) + } + } +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt index 05797bf..f4ea085 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt @@ -3,6 +3,7 @@ package kr.co.lion.farming_customer.fragment import android.content.Intent import android.graphics.Color import android.os.Bundle +import android.util.Log import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View @@ -13,15 +14,21 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView.Recycler import com.google.android.material.divider.MaterialDividerItemDecoration +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kr.co.lion.farming_customer.FarmStatus import kr.co.lion.farming_customer.FarmingLifeFragmnetName import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.activity.CommunityActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.activity.farmingLife.FarmingLifeActivity +import kr.co.lion.farming_customer.dao.FarmDao import kr.co.lion.farming_customer.databinding.FragmentHomeBinding import kr.co.lion.farming_customer.databinding.RowCommunityTabAllBinding import kr.co.lion.farming_customer.databinding.RowGridItemBinding import kr.co.lion.farming_customer.databinding.RowLikeCropBinding +import kr.co.lion.farming_customer.model.farminLifeFarmAndActivity.FarmModel import kr.co.lion.farming_customer.viewmodel.CommunityViewModel import kr.co.lion.farming_customer.viewmodel.HomeViewModel import kr.co.lion.farming_customer.viewmodel.farmingLife.RowGridItemViewModel @@ -31,6 +38,9 @@ class HomeFragment : Fragment() { lateinit var mainActivity: MainActivity lateinit var homeViewModel: HomeViewModel + + var farmList = mutableListOf() + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { fragmentHomeBinding = DataBindingUtil.inflate(layoutInflater, R.layout.fragment_home, container, false) homeViewModel = HomeViewModel() @@ -38,11 +48,21 @@ class HomeFragment : Fragment() { fragmentHomeBinding.lifecycleOwner = this mainActivity = activity as MainActivity + settingData() settingRecyclerView() return fragmentHomeBinding.root } + private fun settingData() { + CoroutineScope(Dispatchers.Main).launch { + // 주말농장 데이터를 가져온다. + farmList = FarmDao.gettingFarmList() + + fragmentHomeBinding.viewPagerFarm.adapter?.notifyDataSetChanged() + } + } + private fun settingRecyclerView() { fragmentHomeBinding.apply { // 농산물 뷰 페이저 어댑터 @@ -123,15 +143,20 @@ class HomeFragment : Fragment() { } override fun getItemCount(): Int { - return 5 + return farmList.size } override fun onBindViewHolder(holder: ViewPagerFarmViewHolder, position: Int) { holder.rowGridItemBinding.rowGridItemViewModel!!.apply { - textView_likeCnt.value = "999" - textView_ItemName.value = "파밍이네 농장" - textView_location.value = "경기도 파밍시 파밍구" - textView_price.value = "20,000원 ~" + textView_likeCnt.value = farmList[position].farm_like_cnt.toString() + textView_ItemName.value = farmList[position].farm_title + textView_location.value = farmList[position].farm_address + farmList[position].farm_option_detail.forEach{map -> + if (map.containsKey("price_area")) { + textView_price.value = map["price_area"] as? String + return@forEach + } + } isLike.value = false } // 하트 클릭 리스너 @@ -140,7 +165,7 @@ class HomeFragment : Fragment() { constraintLikeCancel.setOnClickListener { if(isLike.value!!){ isLike.value = false - imageViewHeart.setImageResource(R.drawable.heart_02) + imageViewHeart.setImageResource(R.drawable.heart_04) textViewLikeCnt.setTextColor(ContextCompat.getColor(requireContext(), R.color.brown_01)) }else{ @@ -158,6 +183,11 @@ class HomeFragment : Fragment() { intent.putExtra("fragmentName", FarmingLifeFragmnetName.FARMING_LIFE_ACTIVITY_DETAIL_FRAGMENT) startActivity(intent) } + CoroutineScope(Dispatchers.Main).launch { + holder.rowGridItemBinding.apply { + FarmDao.gettingContentImage(mainActivity, farmList[position].farm_images[0], imageView) + } + } } } diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/farminLifeFarmAndActivity/FarmModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/farminLifeFarmAndActivity/FarmModel.kt new file mode 100644 index 0000000..dd614c5 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/farminLifeFarmAndActivity/FarmModel.kt @@ -0,0 +1,47 @@ +package kr.co.lion.farming_customer.model.farminLifeFarmAndActivity + +import java.lang.reflect.Constructor + +data class FarmModel( + var farm_idx : Int, // 주말농장 번호 + var farm_seller_idx : Int, // 주말농장 판매자 번호 + var farm_title : String, // 주말농장 이름 + var farm_option_detail : MutableList>, // 주말농장 옵션 상세 + var farm_address : String, // 주말농장 주소 + var farm_content_detail :String, // 주말농장 상세 내용 + var farm_content_warning :String, // 주말농장 주의 사항 + var farm_content_policy : String, // 주말농장 교환 환불 정책 + var farm_apply_date_start : String, // 주말농장 신청 기간 시작 + var farm_apply_date_end :String, // 주말농장 신청 기간 마감 + var farm_use_date_start :String, // 주말농장 이용기간 시작 + var farm_use_date_end : String, // 주말농장 이용 기간 마감 + var farm_can_crop : MutableList, // 주말 농장 생산 가능 작물 + var farm_utility : MutableList>, // 주말농장 편의시설 + var farm_like_cnt : Int, // 주말농장 좋아요 개수 + var farm_images : MutableList, // 주말농장 이미지 첨부파일 + var farm_reg_dt : String, // 주말농장 등록 날짜 + var farm_mod_dt : String, // 주말농장 수정 날짜 + var farm_status : Int // 주말농장 상태 + ){ + constructor() : this( + 0, + 0, + "", + mutableListOf(), + "", + "", + "", + "", + "", + "", + "", + "", + mutableListOf(), + mutableListOf(), + 0, + mutableListOf(), + "", + "", + 0 + ) +} diff --git a/farming_customer/app/src/main/res/drawable/heart_04.xml b/farming_customer/app/src/main/res/drawable/heart_04.xml new file mode 100644 index 0000000..c8dc797 --- /dev/null +++ b/farming_customer/app/src/main/res/drawable/heart_04.xml @@ -0,0 +1,14 @@ + + + diff --git a/farming_customer/app/src/main/res/layout/row_grid_item.xml b/farming_customer/app/src/main/res/layout/row_grid_item.xml index 5e7e26e..002de38 100644 --- a/farming_customer/app/src/main/res/layout/row_grid_item.xml +++ b/farming_customer/app/src/main/res/layout/row_grid_item.xml @@ -54,7 +54,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/heart_02" /> + app:srcCompat="@drawable/heart_04" /> Date: Tue, 16 Apr 2024 09:51:50 +0900 Subject: [PATCH 03/52] :memo: Add loginRegister Package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ViewModel, Activity, fragment 부분에 loginRegister 패키지를 추가했습니다. related to: #49 --- .../app/src/main/AndroidManifest.xml | 2 +- .../{ => loginRegister}/LoginActivity.kt | 18 +++++++++--------- .../{ => loginRegister}/FindAccountFragment.kt | 6 +++--- .../{ => loginRegister}/FindIdDoneFragment.kt | 8 +++----- .../{ => loginRegister}/FindIdFragment.kt | 7 +++---- .../FindPasswordFragment.kt | 6 +++--- .../{ => loginRegister}/FindPwDone2Fragment.kt | 6 ++---- .../{ => loginRegister}/FindPwDoneFragment.kt | 8 +++----- .../{ => loginRegister}/LoginFragment.kt | 6 +++--- .../{ => loginRegister}/Register2Fragment.kt | 8 +++----- .../{ => loginRegister}/Register3Fragment.kt | 6 +++--- .../{ => loginRegister}/RegisterFragment.kt | 6 +++--- .../viewmodel/FindAccountViewModel.kt | 4 ---- .../viewmodel/FindIdDoneViewModel.kt | 4 ---- .../viewmodel/FindIdViewModel.kt | 4 ---- .../viewmodel/FindPwDoneViewModel.kt | 4 ---- .../viewmodel/FindPwViewModel.kt | 4 ---- .../viewmodel/LoginViewModel.kt | 4 ---- .../viewmodel/Register2ViewModel.kt | 4 ---- .../viewmodel/Register3ViewModel.kt | 4 ---- .../viewmodel/RegisterViewModel.kt | 4 ---- .../loginRegister/FindAccountViewModel.kt | 4 ++++ .../loginRegister/FindIdDoneViewModel.kt | 4 ++++ .../viewmodel/loginRegister/FindIdViewModel.kt | 4 ++++ .../loginRegister/FindPwDoneViewModel.kt | 4 ++++ .../viewmodel/loginRegister/FindPwViewModel.kt | 4 ++++ .../viewmodel/loginRegister/LoginViewModel.kt | 4 ++++ .../loginRegister/Register2ViewModel.kt | 4 ++++ .../loginRegister/Register3ViewModel.kt | 4 ++++ .../loginRegister/RegisterViewModel.kt | 4 ++++ .../main/res/layout/fragment_find_account.xml | 2 +- .../src/main/res/layout/fragment_find_id.xml | 2 +- .../main/res/layout/fragment_find_id_done.xml | 2 +- .../main/res/layout/fragment_find_password.xml | 2 +- .../main/res/layout/fragment_find_pw_done.xml | 2 +- .../app/src/main/res/layout/fragment_login.xml | 2 +- .../src/main/res/layout/fragment_register.xml | 2 +- .../src/main/res/layout/fragment_register2.xml | 2 +- .../src/main/res/layout/fragment_register3.xml | 2 +- 39 files changed, 84 insertions(+), 93 deletions(-) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/{ => loginRegister}/LoginActivity.kt (88%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/FindAccountFragment.kt (92%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/FindIdDoneFragment.kt (84%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/FindIdFragment.kt (85%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/FindPasswordFragment.kt (87%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/FindPwDone2Fragment.kt (90%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/FindPwDoneFragment.kt (95%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/LoginFragment.kt (93%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/Register2Fragment.kt (96%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/Register3Fragment.kt (96%) rename farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/{ => loginRegister}/RegisterFragment.kt (96%) delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindAccountViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdDoneViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwDoneViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/LoginViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register2ViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register3ViewModel.kt delete mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/RegisterViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindAccountViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdDoneViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwDoneViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register2ViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register3ViewModel.kt create mode 100644 farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt diff --git a/farming_customer/app/src/main/AndroidManifest.xml b/farming_customer/app/src/main/AndroidManifest.xml index a81d496..c148948 100644 --- a/farming_customer/app/src/main/AndroidManifest.xml +++ b/farming_customer/app/src/main/AndroidManifest.xml @@ -78,7 +78,7 @@ android:name=".activity.myPageManagement.MyPageManagementActivity" android:exported="false" /> diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/LoginActivity.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/loginRegister/LoginActivity.kt similarity index 88% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/LoginActivity.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/loginRegister/LoginActivity.kt index 10b359f..e2b4a45 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/LoginActivity.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/loginRegister/LoginActivity.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.activity +package kr.co.lion.farming_customer.activity.loginRegister import androidx.appcompat.app.AppCompatActivity import android.os.Bundle @@ -9,14 +9,14 @@ import com.google.android.material.transition.MaterialSharedAxis import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.databinding.ActivityLoginBinding -import kr.co.lion.farming_customer.fragment.FindAccountFragment -import kr.co.lion.farming_customer.fragment.FindIdDoneFragment -import kr.co.lion.farming_customer.fragment.FindPwDone2Fragment -import kr.co.lion.farming_customer.fragment.FindPwDoneFragment -import kr.co.lion.farming_customer.fragment.LoginFragment -import kr.co.lion.farming_customer.fragment.Register2Fragment -import kr.co.lion.farming_customer.fragment.Register3Fragment -import kr.co.lion.farming_customer.fragment.RegisterFragment +import kr.co.lion.farming_customer.fragment.loginRegister.FindAccountFragment +import kr.co.lion.farming_customer.fragment.loginRegister.FindIdDoneFragment +import kr.co.lion.farming_customer.fragment.loginRegister.FindPwDone2Fragment +import kr.co.lion.farming_customer.fragment.loginRegister.FindPwDoneFragment +import kr.co.lion.farming_customer.fragment.loginRegister.LoginFragment +import kr.co.lion.farming_customer.fragment.loginRegister.Register2Fragment +import kr.co.lion.farming_customer.fragment.loginRegister.Register3Fragment +import kr.co.lion.farming_customer.fragment.loginRegister.RegisterFragment class LoginActivity : AppCompatActivity() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindAccountFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindAccountFragment.kt similarity index 92% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindAccountFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindAccountFragment.kt index 1d2dee3..47c79ab 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindAccountFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindAccountFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import androidx.fragment.app.Fragment @@ -10,9 +10,9 @@ import androidx.viewpager2.adapter.FragmentStateAdapter import com.google.android.material.tabs.TabLayoutMediator import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentFindAccountBinding -import kr.co.lion.farming_customer.viewmodel.FindAccountViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.FindAccountViewModel class FindAccountFragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindIdDoneFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindIdDoneFragment.kt similarity index 84% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindIdDoneFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindIdDoneFragment.kt index abe3682..e6f7e6a 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindIdDoneFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindIdDoneFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import androidx.fragment.app.Fragment @@ -8,11 +8,9 @@ import android.view.ViewGroup import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity -import kr.co.lion.farming_customer.databinding.FragmentFindIdBinding +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentFindIdDoneBinding -import kr.co.lion.farming_customer.viewmodel.FindIdDoneViewModel -import kr.co.lion.farming_customer.viewmodel.FindIdViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.FindIdDoneViewModel class FindIdDoneFragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindIdFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindIdFragment.kt similarity index 85% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindIdFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindIdFragment.kt index 78a6bbe..adfb65d 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindIdFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindIdFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import androidx.fragment.app.Fragment @@ -8,10 +8,9 @@ import android.view.ViewGroup import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentFindIdBinding -import kr.co.lion.farming_customer.viewmodel.FindAccountViewModel -import kr.co.lion.farming_customer.viewmodel.FindIdViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.FindIdViewModel class FindIdFragment : Fragment() { lateinit var fragmentFindIdBinding: FragmentFindIdBinding diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPasswordFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPasswordFragment.kt similarity index 87% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPasswordFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPasswordFragment.kt index 91e0346..a0de91b 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPasswordFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPasswordFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import androidx.fragment.app.Fragment @@ -8,9 +8,9 @@ import android.view.ViewGroup import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentFindPasswordBinding -import kr.co.lion.farming_customer.viewmodel.FindPwViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.FindPwViewModel class FindPasswordFragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPwDone2Fragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPwDone2Fragment.kt similarity index 90% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPwDone2Fragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPwDone2Fragment.kt index 48a7285..b8786f3 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPwDone2Fragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPwDone2Fragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import android.text.SpannableString @@ -12,10 +12,8 @@ import androidx.core.content.ContextCompat import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentFindPwDone2Binding -import kr.co.lion.farming_customer.databinding.FragmentFindPwDoneBinding -import kr.co.lion.farming_customer.viewmodel.FindPwDoneViewModel class FindPwDone2Fragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPwDoneFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPwDoneFragment.kt similarity index 95% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPwDoneFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPwDoneFragment.kt index 7eafba3..f822aae 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/FindPwDoneFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/FindPwDoneFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import android.text.Editable @@ -14,11 +14,9 @@ import androidx.core.content.ContextCompat import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity -import kr.co.lion.farming_customer.databinding.FragmentFindIdDoneBinding +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentFindPwDoneBinding -import kr.co.lion.farming_customer.viewmodel.FindIdDoneViewModel -import kr.co.lion.farming_customer.viewmodel.FindPwDoneViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.FindPwDoneViewModel class FindPwDoneFragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/LoginFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/LoginFragment.kt similarity index 93% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/LoginFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/LoginFragment.kt index 2377d7a..70759f1 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/LoginFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/LoginFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.content.Intent import android.os.Bundle @@ -9,10 +9,10 @@ import android.view.ViewGroup import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.databinding.FragmentLoginBinding -import kr.co.lion.farming_customer.viewmodel.LoginViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.LoginViewModel class LoginFragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/Register2Fragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/Register2Fragment.kt similarity index 96% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/Register2Fragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/Register2Fragment.kt index 2ddda8b..a153fd8 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/Register2Fragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/Register2Fragment.kt @@ -1,6 +1,5 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister -import android.content.Intent import android.os.Bundle import android.text.Editable import android.text.TextWatcher @@ -8,13 +7,12 @@ import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import androidx.activity.result.ActivityResultLauncher import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentRegister2Binding -import kr.co.lion.farming_customer.viewmodel.Register2ViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.Register2ViewModel class Register2Fragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/Register3Fragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/Register3Fragment.kt similarity index 96% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/Register3Fragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/Register3Fragment.kt index d450d34..a768b51 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/Register3Fragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/Register3Fragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.content.Intent import android.graphics.BitmapFactory @@ -16,10 +16,10 @@ import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.Tools -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.databinding.FragmentRegister3Binding -import kr.co.lion.farming_customer.viewmodel.Register3ViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.Register3ViewModel class Register3Fragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/RegisterFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/RegisterFragment.kt similarity index 96% rename from farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/RegisterFragment.kt rename to farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/RegisterFragment.kt index bd7c589..f97d0da 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/RegisterFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/loginRegister/RegisterFragment.kt @@ -1,4 +1,4 @@ -package kr.co.lion.farming_customer.fragment +package kr.co.lion.farming_customer.fragment.loginRegister import android.os.Bundle import androidx.fragment.app.Fragment @@ -9,9 +9,9 @@ import android.widget.CompoundButton import androidx.databinding.DataBindingUtil import kr.co.lion.farming_customer.LoginFragmentName import kr.co.lion.farming_customer.R -import kr.co.lion.farming_customer.activity.LoginActivity +import kr.co.lion.farming_customer.activity.loginRegister.LoginActivity import kr.co.lion.farming_customer.databinding.FragmentRegisterBinding -import kr.co.lion.farming_customer.viewmodel.RegisterViewModel +import kr.co.lion.farming_customer.viewmodel.loginRegister.RegisterViewModel class RegisterFragment : Fragment() { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindAccountViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindAccountViewModel.kt deleted file mode 100644 index 5d0d2de..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindAccountViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class FindAccountViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdDoneViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdDoneViewModel.kt deleted file mode 100644 index 65116e3..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdDoneViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class FindIdDoneViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdViewModel.kt deleted file mode 100644 index 2a9ad65..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindIdViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class FindIdViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwDoneViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwDoneViewModel.kt deleted file mode 100644 index 1a05471..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwDoneViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class FindPwDoneViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwViewModel.kt deleted file mode 100644 index cd7f531..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/FindPwViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class FindPwViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/LoginViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/LoginViewModel.kt deleted file mode 100644 index 0cc9773..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/LoginViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class LoginViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register2ViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register2ViewModel.kt deleted file mode 100644 index 904e978..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register2ViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class Register2ViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register3ViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register3ViewModel.kt deleted file mode 100644 index f373bc7..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/Register3ViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class Register3ViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/RegisterViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/RegisterViewModel.kt deleted file mode 100644 index b3ace90..0000000 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/RegisterViewModel.kt +++ /dev/null @@ -1,4 +0,0 @@ -package kr.co.lion.farming_customer.viewmodel - -class RegisterViewModel { -} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindAccountViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindAccountViewModel.kt new file mode 100644 index 0000000..ea510c9 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindAccountViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class FindAccountViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdDoneViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdDoneViewModel.kt new file mode 100644 index 0000000..a80faaa --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdDoneViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class FindIdDoneViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdViewModel.kt new file mode 100644 index 0000000..9580153 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindIdViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class FindIdViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwDoneViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwDoneViewModel.kt new file mode 100644 index 0000000..0094d65 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwDoneViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class FindPwDoneViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwViewModel.kt new file mode 100644 index 0000000..160e9f4 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/FindPwViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class FindPwViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt new file mode 100644 index 0000000..3447134 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class LoginViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register2ViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register2ViewModel.kt new file mode 100644 index 0000000..b2c7717 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register2ViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class Register2ViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register3ViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register3ViewModel.kt new file mode 100644 index 0000000..82d4c6f --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/Register3ViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class Register3ViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt new file mode 100644 index 0000000..e498400 --- /dev/null +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt @@ -0,0 +1,4 @@ +package kr.co.lion.farming_customer.viewmodel.loginRegister + +class RegisterViewModel { +} \ No newline at end of file diff --git a/farming_customer/app/src/main/res/layout/fragment_find_account.xml b/farming_customer/app/src/main/res/layout/fragment_find_account.xml index 2b9ea82..a7ba9ce 100644 --- a/farming_customer/app/src/main/res/layout/fragment_find_account.xml +++ b/farming_customer/app/src/main/res/layout/fragment_find_account.xml @@ -6,7 +6,7 @@ + type="kr.co.lion.farming_customer.viewmodel.loginRegister.FindAccountViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.FindIdViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.FindIdDoneViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.FindPwViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.FindPwDoneViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.LoginViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.RegisterViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.Register2ViewModel" /> + type="kr.co.lion.farming_customer.viewmodel.loginRegister.Register3ViewModel" /> Date: Tue, 16 Apr 2024 13:06:10 +0900 Subject: [PATCH 04/52] =?UTF-8?q?:ok=5Fhand:=20Fix=20=EA=B0=95=EC=82=AC?= =?UTF-8?q?=EB=8B=98=20=ED=94=BC=EB=93=9C=EB=B0=B1=20+=20=ED=8C=80?= =?UTF-8?q?=EC=9B=90=20=ED=94=BC=EB=93=9C=EB=B0=B1=20=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20=EC=98=88=EC=95=BD=20=EB=B0=94=ED=85=80=20?= =?UTF-8?q?=EC=8B=9C=ED=8A=B8=20=EB=94=94=EC=9E=90=EC=9D=B8,=20=EC=A3=BC?= =?UTF-8?q?=EB=A7=90=EB=86=8D=EC=9E=A5/=EC=B2=B4=ED=97=98=ED=99=9C?= =?UTF-8?q?=EB=8F=99=20=EC=B9=B4=EB=93=9C=20=EB=B7=B0=20=ED=95=98=ED=8A=B8?= =?UTF-8?q?=20=EC=9C=84=EC=B9=98,=20=ED=99=88=20=EB=86=8D=EC=82=B0?= =?UTF-8?q?=EB=AC=BC=20=EC=83=81=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to : #36 --- .../farming_customer/fragment/HomeFragment.kt | 29 ++++++++++++------- .../BottomSheetActivityReservFragment.kt | 2 +- .../farmingLife/FarmingLifeSearchFragment.kt | 14 ++++++++- .../farmingLife/TapActivityFragment.kt | 2 +- .../fragment/farmingLife/TapFarmFragment.kt | 2 +- .../main/res/drawable/bottom_sheet_stroke.xml | 2 -- .../app/src/main/res/drawable/heart_04.xml | 14 +++++++++ .../fragment_bottom_sheet_activity_reserv.xml | 11 ++++--- .../layout/fragment_farming_life_search.xml | 4 ++- .../app/src/main/res/layout/fragment_home.xml | 3 +- ...nt_my_page_management_delivery_address.xml | 3 +- .../app/src/main/res/layout/item_product.xml | 10 +++---- .../app/src/main/res/layout/row_grid_item.xml | 6 ++-- 13 files changed, 70 insertions(+), 32 deletions(-) create mode 100644 farming_customer/app/src/main/res/drawable/heart_04.xml diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt index 05797bf..115ab81 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/HomeFragment.kt @@ -18,10 +18,13 @@ import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.activity.CommunityActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.activity.farmingLife.FarmingLifeActivity +import kr.co.lion.farming_customer.activity.tradeCrop.TradeDetailActivity import kr.co.lion.farming_customer.databinding.FragmentHomeBinding +import kr.co.lion.farming_customer.databinding.ItemProductBinding import kr.co.lion.farming_customer.databinding.RowCommunityTabAllBinding import kr.co.lion.farming_customer.databinding.RowGridItemBinding import kr.co.lion.farming_customer.databinding.RowLikeCropBinding +import kr.co.lion.farming_customer.databinding.RowRelatedCropBinding import kr.co.lion.farming_customer.viewmodel.CommunityViewModel import kr.co.lion.farming_customer.viewmodel.HomeViewModel import kr.co.lion.farming_customer.viewmodel.farmingLife.RowGridItemViewModel @@ -66,12 +69,12 @@ class HomeFragment : Fragment() { // 추천 농산물 뷰 페이저 어댑터 inner class ViewPagerCropAdapter : RecyclerView.Adapter(){ - inner class ViewPagerCropViewHolder(rowLikeCropBinding: RowLikeCropBinding) : RecyclerView.ViewHolder(rowLikeCropBinding.root){ - val rowLikeCropBinding : RowLikeCropBinding + inner class ViewPagerCropViewHolder(itemProductBinding: ItemProductBinding) : RecyclerView.ViewHolder(itemProductBinding.root){ + val itemProductBinding : ItemProductBinding init { - this.rowLikeCropBinding = rowLikeCropBinding + this.itemProductBinding = itemProductBinding - rowLikeCropBinding.root.layoutParams = ViewGroup.LayoutParams( + itemProductBinding.root.layoutParams = ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) @@ -79,9 +82,9 @@ class HomeFragment : Fragment() { } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewPagerCropViewHolder { - val rowLikeCropBinding = DataBindingUtil.inflate(layoutInflater, R.layout.row_like_crop, parent, false) + val itemProductBinding = DataBindingUtil.inflate(layoutInflater, R.layout.item_product, parent, false) - val viewPagerCropViewHolder = ViewPagerCropViewHolder(rowLikeCropBinding) + val viewPagerCropViewHolder = ViewPagerCropViewHolder(itemProductBinding) return viewPagerCropViewHolder } @@ -90,10 +93,14 @@ class HomeFragment : Fragment() { } override fun onBindViewHolder(holder: ViewPagerCropViewHolder, position: Int) { - holder.rowLikeCropBinding.apply { - textViewLikeCropName.text = "고랭지 배추" - textViewLikeCropPrice.text = "10,000원 / kg" - textViewLikeCropCnt.text = "999" + holder.itemProductBinding.apply { + textViewCropName.text = "고랭지 배추" + textViewTradePrice.text = "10,000원 / kg" + textViewTradeLike.text = "999" + } + holder.itemProductBinding.root.setOnClickListener { + val intent = Intent(mainActivity, TradeDetailActivity::class.java) + startActivity(intent) } } } @@ -140,7 +147,7 @@ class HomeFragment : Fragment() { constraintLikeCancel.setOnClickListener { if(isLike.value!!){ isLike.value = false - imageViewHeart.setImageResource(R.drawable.heart_02) + imageViewHeart.setImageResource(R.drawable.heart_04) textViewLikeCnt.setTextColor(ContextCompat.getColor(requireContext(), R.color.brown_01)) }else{ diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/BottomSheetActivityReservFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/BottomSheetActivityReservFragment.kt index 54e983e..4477344 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/BottomSheetActivityReservFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/BottomSheetActivityReservFragment.kt @@ -123,7 +123,7 @@ class BottomSheetActivityReservFragment : BottomSheetDialogFragment(), DialogYes bottomSheetActivityReservViewModel!!.textView_selectedDate.value = date selectedOption.date = date } - calendar.visibility = View.GONE + calendar.visibility = View.INVISIBLE textinputOption.visibility = View.VISIBLE } diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/FarmingLifeSearchFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/FarmingLifeSearchFragment.kt index 4d103f9..5323c7f 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/FarmingLifeSearchFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/FarmingLifeSearchFragment.kt @@ -35,12 +35,24 @@ class FarmingLifeSearchFragment : Fragment() { deco = MaterialDividerItemDecoration(farmingLifeActivity, MaterialDividerItemDecoration.VERTICAL) deco2 = GridSpaceItemDecoration(2,40,-10,-10,-10) + settingRecyclerView() + settingEvent() return fragmentFarmingLifeSearchBinding.root } + private fun settingEvent() { + fragmentFarmingLifeSearchBinding.apply { + textinputEdit.apply { + setStartIconOnClickListener { + farmingLifeActivity.finish() + } + } + } + } + private fun settingRecyclerView() { fragmentFarmingLifeSearchBinding.apply { recyclerViewSearchResult.apply { @@ -100,7 +112,7 @@ class FarmingLifeSearchFragment : Fragment() { constraintLikeCancel.setOnClickListener { if(rowGridItemViewModel!!.isLike.value!!){ rowGridItemViewModel!!.isLike.value = false - imageViewHeart.setImageResource(R.drawable.heart_02) + imageViewHeart.setImageResource(R.drawable.heart_04) textViewLikeCnt.setTextColor(ContextCompat.getColor(requireContext(), R.color.brown_01)) }else{ rowGridItemViewModel!!.isLike.value = true diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapActivityFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapActivityFragment.kt index 5695105..cdb366d 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapActivityFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapActivityFragment.kt @@ -100,7 +100,7 @@ class TapActivityFragment : Fragment() { constraintLikeCancel.setOnClickListener { if(rowGridItemViewModel!!.isLike.value!!){ rowGridItemViewModel!!.isLike.value = false - imageViewHeart.setImageResource(R.drawable.heart_02) + imageViewHeart.setImageResource(R.drawable.heart_04) textViewLikeCnt.setTextColor(ContextCompat.getColor(requireContext(), R.color.brown_01)) }else{ rowGridItemViewModel!!.isLike.value = true diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapFarmFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapFarmFragment.kt index ec5c4c9..b27d329 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapFarmFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/farmingLife/TapFarmFragment.kt @@ -101,7 +101,7 @@ class TapFarmFragment : Fragment() { constraintLikeCancel.setOnClickListener { if(rowGridItemViewModel!!.isLike.value!!){ rowGridItemViewModel!!.isLike.value = false - imageViewHeart.setImageResource(R.drawable.heart_02) + imageViewHeart.setImageResource(R.drawable.heart_04) textViewLikeCnt.setTextColor(ContextCompat.getColor(requireContext(), R.color.brown_01)) }else{ rowGridItemViewModel!!.isLike.value = true diff --git a/farming_customer/app/src/main/res/drawable/bottom_sheet_stroke.xml b/farming_customer/app/src/main/res/drawable/bottom_sheet_stroke.xml index 09c598f..e460d02 100644 --- a/farming_customer/app/src/main/res/drawable/bottom_sheet_stroke.xml +++ b/farming_customer/app/src/main/res/drawable/bottom_sheet_stroke.xml @@ -3,8 +3,6 @@ - - diff --git a/farming_customer/app/src/main/res/drawable/heart_04.xml b/farming_customer/app/src/main/res/drawable/heart_04.xml new file mode 100644 index 0000000..c8dc797 --- /dev/null +++ b/farming_customer/app/src/main/res/drawable/heart_04.xml @@ -0,0 +1,14 @@ + + + diff --git a/farming_customer/app/src/main/res/layout/fragment_bottom_sheet_activity_reserv.xml b/farming_customer/app/src/main/res/layout/fragment_bottom_sheet_activity_reserv.xml index e7717ab..2f83478 100644 --- a/farming_customer/app/src/main/res/layout/fragment_bottom_sheet_activity_reserv.xml +++ b/farming_customer/app/src/main/res/layout/fragment_bottom_sheet_activity_reserv.xml @@ -82,7 +82,7 @@ android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="vertical" - android:visibility="gone" + android:visibility="invisible" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/calendarTextLayout"> @@ -111,7 +111,7 @@ android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/calendar"> + app:layout_constraintTop_toBottomOf="@id/calendarTextLayout"> @@ -174,12 +175,12 @@ android:id="@+id/textView14" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="20dp" android:fontFamily="@font/pretendard_regular" android:text="총 금액" android:textColor="@color/grey_01" android:textSize="14sp" android:visibility="gone" + app:layout_constraintBottom_toTopOf="@id/buttonActivityReserv_cart" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/recyclerView_selected" /> @@ -206,6 +207,7 @@ android:text="장바구니" android:visibility="gone" app:cornerRadius="10dp" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/buttonActivityReserv_reserv" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/textView14" /> @@ -219,6 +221,7 @@ android:text="예약하기" android:visibility="gone" app:cornerRadius="10dp" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/buttonActivityReserv_cart" app:layout_constraintTop_toTopOf="@id/buttonActivityReserv_cart" /> diff --git a/farming_customer/app/src/main/res/layout/fragment_farming_life_search.xml b/farming_customer/app/src/main/res/layout/fragment_farming_life_search.xml index 74aff81..442ef3e 100644 --- a/farming_customer/app/src/main/res/layout/fragment_farming_life_search.xml +++ b/farming_customer/app/src/main/res/layout/fragment_farming_life_search.xml @@ -13,10 +13,12 @@ tools:context=".fragment.farmingLife.FarmingLifeSearchFragment"> + android:layout_marginHorizontal="20dp" + app:startIconDrawable="@drawable/back"> + android:paddingHorizontal="20dp" + android:paddingBottom="20dp"> @@ -90,15 +90,15 @@ + app:srcCompat="@drawable/heart_04" /> + app:cardElevation="4dp"> + app:srcCompat="@drawable/heart_04" /> Date: Tue, 16 Apr 2024 13:14:26 +0900 Subject: [PATCH 05/52] =?UTF-8?q?=F0=9F=92=84=20Update=20=ED=83=AD=20?= =?UTF-8?q?=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98,=20=EC=BB=A4?= =?UTF-8?q?=EB=AE=A4=EB=8B=88=ED=8B=B0=20=EA=B2=80=EC=83=89,=20=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=ED=8C=85=EB=B2=84=ED=8A=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update 탭 애니메이션, 커뮤니티 검색창, 플로팅 버튼 visibility 입니다. Related to : #36 --- ...services (1).json => google-services.json} | 0 .../fragment/cart/CartFragment.kt | 6 ++--- .../fragment/community/CommunityFragment.kt | 19 ++++----------- .../community/CommunitySearchFragment.kt | 12 ++++++++++ .../community/CommunityTabAllFragment.kt | 24 +++++++++++++++++-- .../CommunityTabInformationFragment.kt | 24 +++++++++++++++++-- .../community/CommunityTabJobFragment.kt | 24 +++++++++++++++++-- .../community/CommunityTabSocialFragment.kt | 22 +++++++++++++++-- .../fragment/review/ReviewHistoryFragment.kt | 6 ++--- .../res/drawable/community_image_like.xml | 2 +- .../app/src/main/res/drawable/heart_04.xml | 14 +++++++++++ .../main/res/layout/fragment_community.xml | 22 ++++------------- .../res/layout/fragment_community_search.xml | 6 ++--- .../res/layout/fragment_community_tab_all.xml | 16 +++++++++++++ .../fragment_community_tab_information.xml | 15 ++++++++++++ .../res/layout/fragment_community_tab_job.xml | 16 +++++++++++++ .../layout/fragment_community_tab_social.xml | 16 +++++++++++++ .../main/res/layout/row_community_tab_all.xml | 9 +++---- .../layout/row_community_tab_information.xml | 7 +++--- .../main/res/layout/row_community_tab_job.xml | 7 +++--- .../res/layout/row_community_tab_social.xml | 7 +++--- 21 files changed, 211 insertions(+), 63 deletions(-) rename farming_customer/app/{google-services (1).json => google-services.json} (100%) create mode 100644 farming_customer/app/src/main/res/drawable/heart_04.xml diff --git a/farming_customer/app/google-services (1).json b/farming_customer/app/google-services.json similarity index 100% rename from farming_customer/app/google-services (1).json rename to farming_customer/app/google-services.json diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/cart/CartFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/cart/CartFragment.kt index bc5d302..388b302 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/cart/CartFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/cart/CartFragment.kt @@ -46,15 +46,15 @@ class CartFragment : Fragment() { when(tab!!.position){ // 농산물 탭 0 -> { - cartActivity.replaceFragment(CartFragmentName.CART_TAB_CROP_FRAGMENT, false, true, null, R.id.containerCartTab) + cartActivity.replaceFragment(CartFragmentName.CART_TAB_CROP_FRAGMENT, false, false, null, R.id.containerCartTab) } // 주말농장 탭 1 -> { - cartActivity.replaceFragment(CartFragmentName.CART_TAB_FARM_FRAGMENT, false, true, null, R.id.containerCartTab) + cartActivity.replaceFragment(CartFragmentName.CART_TAB_FARM_FRAGMENT, false, false, null, R.id.containerCartTab) } // 체험활동 탭 2 -> { - cartActivity.replaceFragment(CartFragmentName.CART_TAB_ACTIVITY_FRAGMENT, false, true, null, R.id.containerCartTab) + cartActivity.replaceFragment(CartFragmentName.CART_TAB_ACTIVITY_FRAGMENT, false, false, null, R.id.containerCartTab) } } } diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityFragment.kt index 703bf3d..2075232 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityFragment.kt @@ -38,7 +38,6 @@ class CommunityFragment : Fragment() { settingToolbar() settingTabLayoutCommunity() - settingFloatingActionButtonCommunityAdd() replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_ALL_FRAGMENT, false, false, null) return fragmentCommunityBinding.root @@ -78,19 +77,19 @@ class CommunityFragment : Fragment() { when(tab!!.position){ // 전체 탭 0 -> { - replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_ALL_FRAGMENT, false, true, null, R.id.containerCommunityTab) + replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_ALL_FRAGMENT, false, false, null, R.id.containerCommunityTab) } // 정보 탭 1 -> { - replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_INFORMATION_FRAGMENT, false, true, null, R.id.containerCommunityTab) + replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_INFORMATION_FRAGMENT, false, false, null, R.id.containerCommunityTab) } // 소통 탭 2 -> { - replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_SOCIAL_FRAGMENT, false, true, null, R.id.containerCommunityTab) + replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_SOCIAL_FRAGMENT, false, false, null, R.id.containerCommunityTab) } // 구인구직 탭 3 -> { - replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_JOB_FRAGMENT, false, true, null, R.id.containerCommunityTab) + replaceFragment(CommunityTabFragmentName.COMMUNITY_TAB_JOB_FRAGMENT, false, false, null, R.id.containerCommunityTab) } } @@ -107,16 +106,6 @@ class CommunityFragment : Fragment() { } } - // 커뮤니티 게시글 작성 - fun settingFloatingActionButtonCommunityAdd() { - fragmentCommunityBinding.apply { - floatingActionButtonCommunityAdd.setOnClickListener { - val communityIntent = Intent(mainActivity, CommunityAddActivity::class.java) - startActivity(communityIntent) - - } - } - } fun replaceFragment(name: CommunityTabFragmentName, addToBackStack:Boolean, isAnimate:Boolean, data:Bundle?, container:Int = R.id.containerCommunityTab){ diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunitySearchFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunitySearchFragment.kt index 83c376f..f732dcc 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunitySearchFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunitySearchFragment.kt @@ -34,11 +34,23 @@ class CommunitySearchFragment : Fragment() { communitySearchActivity = activity as CommunitySearchActivity + settingEvent() settingRecyclerViewCommunitySearch() return fragmentCommunitySearchBinding.root } + // 뒤로 가기 + private fun settingEvent() { + fragmentCommunitySearchBinding.apply { + textInputLayoutCommunitySearch.apply { + setStartIconOnClickListener { + communitySearchActivity.finish() + } + } + } + } + // 커뮤니티 검색 리사이클러뷰 설정 fun settingRecyclerViewCommunitySearch() { fragmentCommunitySearchBinding.apply { diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabAllFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabAllFragment.kt index 93b7e70..abfa414 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabAllFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabAllFragment.kt @@ -7,12 +7,14 @@ import android.view.LayoutInflater import android.view.MotionEvent import android.view.View import android.view.ViewGroup +import androidx.core.view.isVisible import androidx.databinding.DataBindingUtil import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.google.android.material.divider.MaterialDividerItemDecoration import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.activity.CommunityActivity +import kr.co.lion.farming_customer.activity.CommunityAddActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.databinding.FragmentCommunityTabAllBinding import kr.co.lion.farming_customer.databinding.RowCommunityTabAllBinding @@ -38,6 +40,7 @@ class CommunityTabAllFragment : Fragment() { settingButtonCommunityTabAllPopularity() settingRecyclerViewCommunityTabAll() + settingFloatingActionButtonCommunityAllAdd() return fragmentCommunityTabAllBinding.root } @@ -50,6 +53,17 @@ class CommunityTabAllFragment : Fragment() { } } + // 커뮤니티 전체 탭 게시글 작성 + fun settingFloatingActionButtonCommunityAllAdd() { + fragmentCommunityTabAllBinding.apply { + floatingActionButtonCommunityAllAdd.setOnClickListener { + val communityIntent = Intent(mainActivity, CommunityAddActivity::class.java) + startActivity(communityIntent) + + } + } + } + // 커뮤니티 탭 전체 리사이클러뷰 설정 fun settingRecyclerViewCommunityTabAll() { fragmentCommunityTabAllBinding.apply { @@ -89,12 +103,12 @@ class CommunityTabAllFragment : Fragment() { } override fun getItemCount(): Int { - return 100 + return 10 } override fun onBindViewHolder(holder: CommunityTabAllViewHolder, position: Int) { holder.rowCommunityTabAllBinding.communityViewModel?.textViewCommunityListLabelAll?.value = "정보" - holder.rowCommunityTabAllBinding.communityViewModel?.textViewCommunityListTitleAll?.value = "글 제목" + holder.rowCommunityTabAllBinding.communityViewModel?.textViewCommunityListTitleAll?.value = "글 제목 $position" holder.rowCommunityTabAllBinding.communityViewModel?.textViewCommunityListContentAll?.value = "글 내용입니다 글 내용입니다 글 내용입니다\n" + "글 내용입니다" holder.rowCommunityTabAllBinding.communityViewModel?.textViewCommunityListViewCntAll?.value = "999+" @@ -114,6 +128,12 @@ class CommunityTabAllFragment : Fragment() { } } + if (position == 9) { + fragmentCommunityTabAllBinding.floatingActionButtonCommunityAllAdd.isVisible = false + } else { + fragmentCommunityTabAllBinding.floatingActionButtonCommunityAllAdd.isVisible = true + } + } } } \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabInformationFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabInformationFragment.kt index 4b3615a..a1fe6d5 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabInformationFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabInformationFragment.kt @@ -6,12 +6,14 @@ import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.view.isVisible import androidx.databinding.DataBindingUtil import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.google.android.material.divider.MaterialDividerItemDecoration import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.activity.CommunityActivity +import kr.co.lion.farming_customer.activity.CommunityAddActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.databinding.FragmentCommunityTabAllBinding import kr.co.lion.farming_customer.databinding.FragmentCommunityTabInformationBinding @@ -35,6 +37,7 @@ class CommunityTabInformationFragment : Fragment() { mainActivity = activity as MainActivity settingButtonCommunityTabInformationPopularity() + settingFloatingActionButtonCommunityInformationAdd() settingRecyclerViewCommunityTabInformation() return fragmentCommunityTabInformationBinding.root @@ -48,6 +51,17 @@ class CommunityTabInformationFragment : Fragment() { } } + // 커뮤니티 정보 탭 게시글 작성 + fun settingFloatingActionButtonCommunityInformationAdd() { + fragmentCommunityTabInformationBinding.apply { + floatingActionButtonCommunityInformationAdd.setOnClickListener { + val communityIntent = Intent(mainActivity, CommunityAddActivity::class.java) + startActivity(communityIntent) + + } + } + } + // 커뮤니티 탭 정보 리사이클러뷰 설정 fun settingRecyclerViewCommunityTabInformation() { fragmentCommunityTabInformationBinding.apply { @@ -87,12 +101,12 @@ class CommunityTabInformationFragment : Fragment() { } override fun getItemCount(): Int { - return 100 + return 10 } override fun onBindViewHolder(holder: CommunityTabInformationViewHolder, position: Int) { holder.rowCommunityTabInformationBinding.communityViewModel?.textViewCommunityListLabelInformation?.value = "정보" - holder.rowCommunityTabInformationBinding.communityViewModel?.textViewCommunityListTitleInformation?.value = "글 제목" + holder.rowCommunityTabInformationBinding.communityViewModel?.textViewCommunityListTitleInformation?.value = "글 제목 $position" holder.rowCommunityTabInformationBinding.communityViewModel?.textViewCommunityListContentInformation?.value = "글 내용입니다 글 내용입니다 글 내용입니다\n" + "글 내용입니다" holder.rowCommunityTabInformationBinding.communityViewModel?.textViewCommunityListViewCntInformation?.value = "999+" @@ -111,6 +125,12 @@ class CommunityTabInformationFragment : Fragment() { textViewCommunityListLikeCntInformation.isSelected = !textViewCommunityListLikeCntInformation.isSelected } } + + if (position == 9) { + fragmentCommunityTabInformationBinding.floatingActionButtonCommunityInformationAdd.isVisible = false + } else { + fragmentCommunityTabInformationBinding.floatingActionButtonCommunityInformationAdd.isVisible = true + } } } diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabJobFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabJobFragment.kt index 34d5bed..cbc4e0c 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabJobFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabJobFragment.kt @@ -6,12 +6,14 @@ import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.view.isVisible import androidx.databinding.DataBindingUtil import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.google.android.material.divider.MaterialDividerItemDecoration import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.activity.CommunityActivity +import kr.co.lion.farming_customer.activity.CommunityAddActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.activity.review.ReviewActivity import kr.co.lion.farming_customer.databinding.FragmentCommunityTabJobBinding @@ -35,6 +37,7 @@ class CommunityTabJobFragment : Fragment() { settingButtonCommunityTabJobPopularity() settingRecyclerViewCommunityTabJob() + settingFloatingActionButtonCommunityJobAdd() return fragmentCommunityTabJobBinding.root } @@ -47,6 +50,17 @@ class CommunityTabJobFragment : Fragment() { } } + // 커뮤니티 구인구직 탭 게시글 작성 + fun settingFloatingActionButtonCommunityJobAdd() { + fragmentCommunityTabJobBinding.apply { + floatingActionButtonCommunityJobAdd.setOnClickListener { + val communityIntent = Intent(mainActivity, CommunityAddActivity::class.java) + startActivity(communityIntent) + + } + } + } + // 커뮤니티 탭 소통 리사이클러뷰 설정 fun settingRecyclerViewCommunityTabJob() { fragmentCommunityTabJobBinding.apply { @@ -86,12 +100,12 @@ class CommunityTabJobFragment : Fragment() { } override fun getItemCount(): Int { - return 100 + return 10 } override fun onBindViewHolder(holder: CommunityTabJobViewHolder, position: Int) { holder.rowCommunityTabJobBinding.communityViewModel?.textViewCommunityListLabelJob?.value = "구인구직" - holder.rowCommunityTabJobBinding.communityViewModel?.textViewCommunityListTitleJob?.value = "글 제목" + holder.rowCommunityTabJobBinding.communityViewModel?.textViewCommunityListTitleJob?.value = "글 제목 $position" holder.rowCommunityTabJobBinding.communityViewModel?.textViewCommunityListContentJob?.value = "글 내용입니다 글 내용입니다 글 내용입니다\n" + "글 내용입니다" holder.rowCommunityTabJobBinding.communityViewModel?.textViewCommunityListViewCntJob?.value = "999+" @@ -110,6 +124,12 @@ class CommunityTabJobFragment : Fragment() { textViewCommunityListLikeCntJob.isSelected = !textViewCommunityListLikeCntJob.isSelected } } + + if (position == 9) { + fragmentCommunityTabJobBinding.floatingActionButtonCommunityJobAdd.isVisible = false + } else { + fragmentCommunityTabJobBinding.floatingActionButtonCommunityJobAdd.isVisible = true + } } } } \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabSocialFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabSocialFragment.kt index 064968d..ab3408d 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabSocialFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/community/CommunityTabSocialFragment.kt @@ -6,12 +6,14 @@ import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.view.isVisible import androidx.databinding.DataBindingUtil import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.google.android.material.divider.MaterialDividerItemDecoration import kr.co.lion.farming_customer.R import kr.co.lion.farming_customer.activity.CommunityActivity +import kr.co.lion.farming_customer.activity.CommunityAddActivity import kr.co.lion.farming_customer.activity.MainActivity import kr.co.lion.farming_customer.databinding.FragmentCommunityTabSocialBinding import kr.co.lion.farming_customer.databinding.RowCommunityTabInformationBinding @@ -34,6 +36,7 @@ class CommunityTabSocialFragment : Fragment() { settingButtonCommunityTabSocialPopularity() settingRecyclerViewCommunityTabSocial() + settingFloatingActionButtonCommunitySocialAdd() return fragmentCommunityTabSocialBinding.root } @@ -42,7 +45,16 @@ class CommunityTabSocialFragment : Fragment() { fun settingButtonCommunityTabSocialPopularity() { fragmentCommunityTabSocialBinding.apply { buttonCommunityTabSocialPopularity.isChecked = true + } + } + // 커뮤니티 소통 탭 게시글 작성 + fun settingFloatingActionButtonCommunitySocialAdd() { + fragmentCommunityTabSocialBinding.apply { + floatingActionButtonCommunitySocialAdd.setOnClickListener { + val communityIntent = Intent(mainActivity, CommunityAddActivity::class.java) + startActivity(communityIntent) + } } } @@ -85,12 +97,12 @@ class CommunityTabSocialFragment : Fragment() { } override fun getItemCount(): Int { - return 100 + return 10 } override fun onBindViewHolder(holder: CommunityTabSocialViewHolder, position: Int) { holder.rowCommunityTabSocialBinding.communityViewModel?.textViewCommunityListLabelSocial?.value = "소통" - holder.rowCommunityTabSocialBinding.communityViewModel?.textViewCommunityListTitleSocial?.value = "글 제목" + holder.rowCommunityTabSocialBinding.communityViewModel?.textViewCommunityListTitleSocial?.value = "글 제목 $position" holder.rowCommunityTabSocialBinding.communityViewModel?.textViewCommunityListContentSocial?.value = "글 내용입니다 글 내용입니다 글 내용입니다\n" + "글 내용입니다" holder.rowCommunityTabSocialBinding.communityViewModel?.textViewCommunityListViewCntSocial?.value = "999+" @@ -109,6 +121,12 @@ class CommunityTabSocialFragment : Fragment() { textViewCommunityListLikeCntSocial.isSelected = !textViewCommunityListLikeCntSocial.isSelected } } + + if (position == 9) { + fragmentCommunityTabSocialBinding.floatingActionButtonCommunitySocialAdd.isVisible = false + } else { + fragmentCommunityTabSocialBinding.floatingActionButtonCommunitySocialAdd.isVisible = true + } } } } \ No newline at end of file diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/review/ReviewHistoryFragment.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/review/ReviewHistoryFragment.kt index 887dc40..6f902c1 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/review/ReviewHistoryFragment.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/review/ReviewHistoryFragment.kt @@ -46,15 +46,15 @@ class ReviewHistoryFragment : Fragment() { when(tab!!.position){ // 농산물 탭 0 -> { - reviewActivity.replaceFragment(ReviewFragmentName.REVIEW_TAB_CROP_FRAGMENT, false, true, null, R.id.containerReviewHistoryTab) + reviewActivity.replaceFragment(ReviewFragmentName.REVIEW_TAB_CROP_FRAGMENT, false, false, null, R.id.containerReviewHistoryTab) } // 주말농장 탭 1 -> { - reviewActivity.replaceFragment(ReviewFragmentName.REVIEW_TAB_FARM_FRAGMENT, false, true, null, R.id.containerReviewHistoryTab) + reviewActivity.replaceFragment(ReviewFragmentName.REVIEW_TAB_FARM_FRAGMENT, false, false, null, R.id.containerReviewHistoryTab) } // 체험활동 탭 2 -> { - reviewActivity.replaceFragment(ReviewFragmentName.REVIEW_TAB_ACTIVITY_FRAGMENT, false, true, null, R.id.containerReviewHistoryTab) + reviewActivity.replaceFragment(ReviewFragmentName.REVIEW_TAB_ACTIVITY_FRAGMENT, false, false, null, R.id.containerReviewHistoryTab) } } } diff --git a/farming_customer/app/src/main/res/drawable/community_image_like.xml b/farming_customer/app/src/main/res/drawable/community_image_like.xml index 98ba509..d065432 100644 --- a/farming_customer/app/src/main/res/drawable/community_image_like.xml +++ b/farming_customer/app/src/main/res/drawable/community_image_like.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/farming_customer/app/src/main/res/drawable/heart_04.xml b/farming_customer/app/src/main/res/drawable/heart_04.xml new file mode 100644 index 0000000..17c0bc2 --- /dev/null +++ b/farming_customer/app/src/main/res/drawable/heart_04.xml @@ -0,0 +1,14 @@ + + + diff --git a/farming_customer/app/src/main/res/layout/fragment_community.xml b/farming_customer/app/src/main/res/layout/fragment_community.xml index 5e36da8..8b4f4f6 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community.xml @@ -96,24 +96,12 @@ android:layout_height="0dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/tabLayoutCommunity" /> - - + app:layout_constraintTop_toBottomOf="@+id/tabLayoutCommunity" + app:layout_constraintVertical_bias="0.0" /> + + diff --git a/farming_customer/app/src/main/res/layout/fragment_community_search.xml b/farming_customer/app/src/main/res/layout/fragment_community_search.xml index aedcd6e..c2363ab 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community_search.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community_search.xml @@ -16,9 +16,9 @@ tools:context=".fragment.community.CommunitySearchFragment"> + app:layout_constraintTop_toBottomOf="@+id/textInputLayoutCommunitySearch" /> diff --git a/farming_customer/app/src/main/res/layout/fragment_community_tab_all.xml b/farming_customer/app/src/main/res/layout/fragment_community_tab_all.xml index d6328b8..9ca548d 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community_tab_all.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community_tab_all.xml @@ -85,5 +85,21 @@ + + diff --git a/farming_customer/app/src/main/res/layout/fragment_community_tab_information.xml b/farming_customer/app/src/main/res/layout/fragment_community_tab_information.xml index e5e09eb..6294451 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community_tab_information.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community_tab_information.xml @@ -85,5 +85,20 @@ + diff --git a/farming_customer/app/src/main/res/layout/fragment_community_tab_job.xml b/farming_customer/app/src/main/res/layout/fragment_community_tab_job.xml index d50c296..b38ab3a 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community_tab_job.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community_tab_job.xml @@ -85,5 +85,21 @@ + + diff --git a/farming_customer/app/src/main/res/layout/fragment_community_tab_social.xml b/farming_customer/app/src/main/res/layout/fragment_community_tab_social.xml index 668bc31..2686f0a 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community_tab_social.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community_tab_social.xml @@ -85,5 +85,21 @@ + + diff --git a/farming_customer/app/src/main/res/layout/row_community_tab_all.xml b/farming_customer/app/src/main/res/layout/row_community_tab_all.xml index edd1722..282f0a9 100644 --- a/farming_customer/app/src/main/res/layout/row_community_tab_all.xml +++ b/farming_customer/app/src/main/res/layout/row_community_tab_all.xml @@ -160,9 +160,10 @@ @@ -170,21 +171,21 @@ android:id="@+id/imageViewCommunityListLikeAll" android:layout_width="match_parent" android:layout_height="match_parent" + android:checked="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - android:checked="true" - app:srcCompat="@drawable/heart_02" /> + app:srcCompat="@drawable/community_image_like" /> @@ -170,21 +171,21 @@ android:id="@+id/imageViewCommunityListLikeInformation" android:layout_width="match_parent" android:layout_height="match_parent" + android:checked="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - android:checked="true" app:srcCompat="@drawable/community_image_like" /> @@ -170,21 +171,21 @@ android:id="@+id/imageViewCommunityListLikeJob" android:layout_width="match_parent" android:layout_height="match_parent" + android:checked="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - android:checked="true" app:srcCompat="@drawable/community_image_like" /> @@ -170,21 +171,21 @@ android:id="@+id/imageViewCommunityListLikeSocial" android:layout_width="match_parent" android:layout_height="match_parent" + android:checked="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - android:checked="true" app:srcCompat="@drawable/community_image_like" /> Date: Tue, 16 Apr 2024 14:25:12 +0900 Subject: [PATCH 06/52] =?UTF-8?q?:sparkles:=20Feat=20Login=20ViewModel=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fragment_login.xml과 LoginViewModel을 연결했습니다. related to: #49 --- .../viewmodel/loginRegister/LoginViewModel.kt | 9 ++++++++- .../app/src/main/res/layout/fragment_login.xml | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt index 3447134..bd02447 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/LoginViewModel.kt @@ -1,4 +1,11 @@ package kr.co.lion.farming_customer.viewmodel.loginRegister -class LoginViewModel { +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel + +class LoginViewModel: ViewModel() { + // 아이디 + val textFieldLoginId = MutableLiveData() + // 비밀번호 + val textFieldLoginPw = MutableLiveData() } \ No newline at end of file diff --git a/farming_customer/app/src/main/res/layout/fragment_login.xml b/farming_customer/app/src/main/res/layout/fragment_login.xml index 8017da7..ce3760a 100644 --- a/farming_customer/app/src/main/res/layout/fragment_login.xml +++ b/farming_customer/app/src/main/res/layout/fragment_login.xml @@ -51,6 +51,7 @@ android:layout_height="match_parent" android:fontFamily="@font/pretendard_regular" android:inputType="text" + android:text="@={loginViewModel.textFieldLoginId}" android:paddingTop="10dp" android:paddingBottom="10dp" android:textColor="@color/brown_01" @@ -83,6 +84,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fontFamily="@font/pretendard_regular" + android:text="@={loginViewModel.textFieldLoginPw}" android:inputType="textPassword" android:paddingTop="10dp" android:paddingBottom="10dp" From ea5c2cc72e065bf0840db845a5b59a6ffe047460 Mon Sep 17 00:00:00 2001 From: Kyung Soo Lee Date: Tue, 16 Apr 2024 14:54:50 +0900 Subject: [PATCH 07/52] =?UTF-8?q?:sparkles:=20Feat=20Register=20ViewModel?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fragment_register.xml과 RegisterViewModel을 연결했습니다. related to: #49 --- .../loginRegister/RegisterViewModel.kt | 19 ++++++++++++++++++- .../src/main/res/layout/fragment_register.xml | 5 ++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt index e498400..b49fcfd 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/viewmodel/loginRegister/RegisterViewModel.kt @@ -1,4 +1,21 @@ package kr.co.lion.farming_customer.viewmodel.loginRegister -class RegisterViewModel { +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel + +class RegisterViewModel : ViewModel() { + // 서비스 이용 약관 상태 관리 + val isServiceTermChecked = MutableLiveData() + // 개인정보 수집 및 이용 안내 상태 관리 + val isPersonalInfoTermChecked = MutableLiveData() + // 알림 서비스 수락 + val isAlertServiceTermChecked = MutableLiveData() + + init { + // 초기값 설정 + isServiceTermChecked.value = false + isPersonalInfoTermChecked.value = false + isAlertServiceTermChecked.value = false + } + } \ No newline at end of file diff --git a/farming_customer/app/src/main/res/layout/fragment_register.xml b/farming_customer/app/src/main/res/layout/fragment_register.xml index 6348324..de579b6 100644 --- a/farming_customer/app/src/main/res/layout/fragment_register.xml +++ b/farming_customer/app/src/main/res/layout/fragment_register.xml @@ -83,12 +83,13 @@ android:id="@+id/checkBoxRegServiceTerm" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dp" + android:layout_marginTop="8dp" android:button="@drawable/checkbox_selector" android:fontFamily="@font/pretendard_semibold" android:text=" 서비스 이용 약관 (필수)" android:textColor="@color/brown_01" android:textSize="16sp" + android:checked="@={registerViewModel.isServiceTermChecked}" app:buttonTint="@color/green_main" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/view2" /> @@ -129,6 +130,7 @@ android:button="@drawable/checkbox_selector" android:fontFamily="@font/pretendard_semibold" android:text=" 개인정보 수집 및 이용 안내 (필수)" + android:checked="@={registerViewModel.isPersonalInfoTermChecked()}" android:textColor="@color/brown_01" android:textSize="16sp" app:buttonTint="@color/green_main" @@ -170,6 +172,7 @@ android:button="@drawable/checkbox_selector" android:fontFamily="@font/pretendard_semibold" android:text=" 알림 서비스 수락 (선택)" + android:checked="@={registerViewModel.isAlertServiceTermChecked()}" android:textColor="@color/brown_01" android:textSize="16sp" app:buttonTint="@color/green_main" From a95df8b2cae738bebe72811c151e80527d1d4dcf Mon Sep 17 00:00:00 2001 From: hyuun Date: Tue, 16 Apr 2024 15:06:11 +0900 Subject: [PATCH 08/52] =?UTF-8?q?=F0=9F=92=84=20Update=20=EC=BB=A4?= =?UTF-8?q?=EB=AE=A4=EB=8B=88=ED=8B=B0=20=EA=B2=80=EC=83=89=20=EC=B0=BD=20?= =?UTF-8?q?=EB=86=92=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update 커뮤니티 검색 창 높이 입니다. Related to : #36 --- .../app/src/main/res/layout/fragment_community_search.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/farming_customer/app/src/main/res/layout/fragment_community_search.xml b/farming_customer/app/src/main/res/layout/fragment_community_search.xml index c2363ab..ac97cd5 100644 --- a/farming_customer/app/src/main/res/layout/fragment_community_search.xml +++ b/farming_customer/app/src/main/res/layout/fragment_community_search.xml @@ -30,7 +30,7 @@ Date: Tue, 16 Apr 2024 17:43:35 +0900 Subject: [PATCH 09/52] :lipstick: Update dropdown menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - logo_02.xml 수정 - TradeSearchActivity.kt 에서 정렬 방식 드롭다운으로 변경 - BottomSheetTradeCrop 에서 정렬 방식 드롭다운으로 변경 related to: #36 --- .../activity/tradeCrop/TradeSearchActivity.kt | 30 +-- .../tradeCrop/BottomSheetTradeCrop.kt | 23 +- .../src/main/res/drawable/box_border_gray.xml | 12 + .../app/src/main/res/drawable/logo_02.xml | 221 ++++++++++-------- .../main/res/layout/activity_trade_detail.xml | 2 - .../main/res/layout/activity_trade_search.xml | 193 ++++++--------- .../fragment_bottom_sheet_trade_crop.xml | 98 ++++---- .../res/layout/item_spinner_crop_option.xml | 14 ++ .../res/layout/item_spinner_search_sort.xml | 15 ++ .../src/main/res/layout/row_review_crop.xml | 1 + 10 files changed, 291 insertions(+), 318 deletions(-) create mode 100644 farming_customer/app/src/main/res/drawable/box_border_gray.xml create mode 100644 farming_customer/app/src/main/res/layout/item_spinner_crop_option.xml create mode 100644 farming_customer/app/src/main/res/layout/item_spinner_search_sort.xml diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/tradeCrop/TradeSearchActivity.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/tradeCrop/TradeSearchActivity.kt index 018a086..0dadc0f 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/tradeCrop/TradeSearchActivity.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/activity/tradeCrop/TradeSearchActivity.kt @@ -5,6 +5,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.ArrayAdapter import androidx.core.content.ContextCompat import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.RecyclerView @@ -30,34 +31,19 @@ class TradeSearchActivity : AppCompatActivity() { binding.tradeSearchViewModel = tradeSearchViewModel binding.lifecycleOwner = this - setButton() + settingDropDown() setRecyclerView() setContentView(binding.root) } - private fun setButton(){ + // 드롭다운 설정 + private fun settingDropDown() { binding.apply { - // 정렬 드롭다운 버튼 - imageButtonDropDown.setOnClickListener { - // 드롭다운 버튼이 눌리지 않았다면 - if(!dropDownButtonClicked){ - dropDownButtonClicked = true - // image를 변경하고 아래 버튼들을 보여준다. - imageButtonDropDown.setImageResource(R.drawable.polygon_up) - buttonTradeSearchLikeDesc.visibility = View.VISIBLE - buttonTradeSearchPriceAsc.visibility = View.VISIBLE - buttonTradeSearchPriceDesc.visibility = View.VISIBLE - }else { - dropDownButtonClicked = false - // 드롭다운 버튼이 눌린 상태라면 - // image를 변경하고 아래 버튼들을 숨긴다 - imageButtonDropDown.setImageResource(R.drawable.polygon_down) - buttonTradeSearchLikeDesc.visibility = View.GONE - buttonTradeSearchPriceAsc.visibility = View.GONE - buttonTradeSearchPriceDesc.visibility = View.GONE - } - } + // 드롭다운 설정 + val typeList = listOf("별점순", "찜순", "금액 높은순", "금액 낮은순") + val typeArrayAdapter = ArrayAdapter(this@TradeSearchActivity, R.layout.item_spinner_search_sort, typeList) + textViewTradeSearchSort.setAdapter(typeArrayAdapter) } } diff --git a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/tradeCrop/BottomSheetTradeCrop.kt b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/tradeCrop/BottomSheetTradeCrop.kt index 7623f57..a767ba3 100644 --- a/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/tradeCrop/BottomSheetTradeCrop.kt +++ b/farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/tradeCrop/BottomSheetTradeCrop.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.ArrayAdapter import androidx.databinding.DataBindingUtil import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kr.co.lion.farming_customer.R @@ -26,23 +27,23 @@ class BottomSheetTradeCrop : BottomSheetDialogFragment() { tradeDetailActivity = activity as TradeDetailActivity setButton() + settingDropDown() return binding.root } + + // 드롭다운 설정 + private fun settingDropDown() { + binding.apply { + // 드롭다운 설정 + val typeList = listOf("감자 10kg") + val typeArrayAdapter = ArrayAdapter(requireContext(), R.layout.item_spinner_crop_option, typeList) + textViewBottomTradeOptionName.setAdapter(typeArrayAdapter) + } + } private fun setButton(){ binding.apply { - // 농산물 표시 버튼 - imageButtonDropDown.setOnClickListener { - // visibility 변경 - if(constraintLayoutCrop.visibility == View.GONE) { - imageButtonDropDown.setImageResource(R.drawable.polygon_up) - constraintLayoutCrop.visibility = View.VISIBLE - } else { - imageButtonDropDown.setImageResource(R.drawable.polygon_down) - constraintLayoutCrop.visibility = View.GONE - } - } // + 버튼 toggleButtonPlus.setOnClickListener { diff --git a/farming_customer/app/src/main/res/drawable/box_border_gray.xml b/farming_customer/app/src/main/res/drawable/box_border_gray.xml new file mode 100644 index 0000000..e83c1cb --- /dev/null +++ b/farming_customer/app/src/main/res/drawable/box_border_gray.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/farming_customer/app/src/main/res/drawable/logo_02.xml b/farming_customer/app/src/main/res/drawable/logo_02.xml index 769b904..ebc077a 100644 --- a/farming_customer/app/src/main/res/drawable/logo_02.xml +++ b/farming_customer/app/src/main/res/drawable/logo_02.xml @@ -1,99 +1,126 @@ - - - - - - - - - - - - - - - + android:width="88dp" + android:height="90dp" + android:viewportWidth="88" + android:viewportHeight="90"> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/farming_customer/app/src/main/res/layout/activity_trade_detail.xml b/farming_customer/app/src/main/res/layout/activity_trade_detail.xml index 8afd815..6e2993c 100644 --- a/farming_customer/app/src/main/res/layout/activity_trade_detail.xml +++ b/farming_customer/app/src/main/res/layout/activity_trade_detail.xml @@ -331,9 +331,7 @@ android:id="@+id/recyclerViewReview" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="20dp" android:layout_marginTop="8dp" - android:layout_marginEnd="20dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" diff --git a/farming_customer/app/src/main/res/layout/activity_trade_search.xml b/farming_customer/app/src/main/res/layout/activity_trade_search.xml index 874e7fa..4f7587b 100644 --- a/farming_customer/app/src/main/res/layout/activity_trade_search.xml +++ b/farming_customer/app/src/main/res/layout/activity_trade_search.xml @@ -16,151 +16,90 @@ android:background="@color/white" android:paddingHorizontal="20dp"> - + + + + + + app:layout_constraintTop_toBottomOf="@+id/textInputLayout17"> - - + + + android:textSize="12sp" /> - - - - - - - - - - -