Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/like#52
Browse files Browse the repository at this point in the history
# Conflicts:
#	farming_customer/app/build.gradle.kts
#	farming_customer/app/src/main/java/kr/co/lion/farming_customer/fragment/LikeFragment.kt
#	farming_customer/app/src/main/java/kr/co/lion/farming_customer/model/CropModel.kt
#	farming_customer/app/src/main/res/layout/row_like_post.xml
  • Loading branch information
kimjingyoung committed Apr 24, 2024
2 parents 207badb + e4985dd commit e7b2c1b
Show file tree
Hide file tree
Showing 252 changed files with 10,382 additions and 2,698 deletions.
6 changes: 6 additions & 0 deletions farming_customer/.idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions farming_customer/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.gms.google-services")
id ("kotlin-parcelize")
id("kotlin-parcelize")
}

android {
Expand Down Expand Up @@ -53,19 +53,23 @@ 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")
implementation("com.google.android.gms:play-services-maps:18.2.0") // 농기구 구글맵
implementation("com.google.android.gms:play-services-location:21.1.0") // 농기구 구글맵
implementation ("androidx.viewpager2:viewpager2:1.0.0")
implementation("com.github.bumptech.glide:glide:4.16.0")


// firebase
implementation(platform("com.google.firebase:firebase-bom:32.8.1"))
implementation("com.google.firebase:firebase-analytics")
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")

implementation("com.github.bumptech.glide:glide:4.16.0")

// glide
implementation ("com.github.bumptech.glide:glide:4.12.0")
Expand Down
11 changes: 7 additions & 4 deletions farming_customer/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
android:name=".activity.myPageSetting.MyPageSettingActivity"
android:exported="false" />
<activity
android:name=".activity.CommunitySearchActivity"
android:name=".activity.community.CommunitySearchActivity"
android:exported="false" />
<activity
android:name=".activity.CommunityAddActivity"
android:name=".activity.community.CommunityAddActivity"
android:exported="false" />
<activity
android:name=".activity.CommunityActivity"
android:name=".activity.community.CommunityActivity"
android:exported="false" />
<activity
android:name=".activity.cart.CartActivity"
Expand Down Expand Up @@ -78,7 +78,10 @@
android:name=".activity.myPageManagement.MyPageManagementActivity"
android:exported="false" />
<activity
android:name=".activity.LoginActivity"
android:name=".activity.myPageMyPost.MyPageMyPostActivity"
android:exported="false" />
<activity
android:name=".activity.loginRegister.LoginActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class DialogYesNo(
subject: String?,
content: String,
activity: AppCompatActivity,
position: Int? = null // 리사이클러뷰 삭제할 때의 아이템 포지션
position: Int? = null, // 리사이클러뷰 삭제할 때의 아이템 포지션
yes_text: String? = "확인"
) : DialogFragment() {

lateinit var dialogYesnoBinding: DialogYesnoBinding
Expand All @@ -32,6 +33,7 @@ class DialogYesNo(
var activit = activity
var dialogYesNoInterface = dialogYesNoInterface
var position = position
var yes_text = yes_text


override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
Expand Down Expand Up @@ -71,6 +73,9 @@ class DialogYesNo(
// 다이얼로그 내용
customDialogViewModel?.textViewDialogYesNoText?.value = content

// 확인 버튼 텍스트
customDialogViewModel?.buttonCustomDialogYesNoYesText?.value = yes_text

// 확인 버튼
buttonCustomDialogYesNoYes.setOnClickListener {
if(position != null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import androidx.appcompat.app.AppCompatActivity
import java.io.File
import java.io.FileOutputStream
import android.app.Activity
import android.content.DialogInterface
import android.util.TypedValue
import androidx.viewpager2.widget.ViewPager2
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlin.concurrent.thread

class Tools {
Expand Down Expand Up @@ -146,6 +149,17 @@ class Tools {
context.resources.displayMetrics
).toInt()
}

// 입력 요소가 비어있을때 보여줄 다이얼로그를 구성하는 메서드
fun showErrorDialog(context: Context, view: View, title:String, message:String){
val materialAlertDialogBuilder = MaterialAlertDialogBuilder(context)
materialAlertDialogBuilder.setTitle(title)
materialAlertDialogBuilder.setMessage(message)
materialAlertDialogBuilder.setPositiveButton("확인"){ _: DialogInterface, _: Int ->
showSoftInput(context, view)
}
materialAlertDialogBuilder.show()
}
}

}
Expand Down Expand Up @@ -258,6 +272,7 @@ enum class FarmingLifeFragmnetName(var str:String){
FARMING_LIFE_FARM_DETAIL_FARMGNET("FarmingLifeFarmDetailFragment"),
FARMING_LIFE_ACTIVITY_DETAIL_FRAGMENT("FarmingLifeActivityDetailFragment")
}

// 농기구 프래그먼트
enum class FarmingLifeToolsFragmentName(var str: String) {
FARMING_LIFE_TOOLS_MAP_FRAGMENT("FarmingLifeToolsMapFragment"),
Expand All @@ -273,6 +288,7 @@ enum class LoginFragmentName(var str: String){
FIND_ID_DONE_FRAGMENT("FindIdDoneFragment"),
FIND_PW_DONE_FRAGMENT("FindPwDoneFragment"),
FIND_PW_DONE2_FRAGMENT("FindPwDone2Fragment"),
CANT_FIND_ID_FRAGMENT("CantFindIdFragment"),
}

// PaymentActivity에서 보여줄 프래그먼트들의 이름
Expand All @@ -282,4 +298,143 @@ enum class PaymentFragmentName(var str:String){
PAYMENT_SUCCESS_FRAGMENT("PaymentSuccessFragment"),
PAYMENT_FAIL_FRAGMENT("PaymentFailFragment"),
PAYMENT_DELIVERY_ADDRESS_FRAGMENT("PaymentDeliveryAddressFragment")
}

// 게시판 종류를 나타내는 값을 정의한다.
enum class PostType(var str:String, var number:Int){
TYPE_ALL("전체", 0),
TYPE_INFORMATION("정보", 1),
TYPE_SOCIAL("소통", 2),
TYPE_JOB("구인구직", 3),
}

// 게시판 상태를 나타내는 값을 정의한다.
enum class PostStatus(var str:String, var number:Int) {
POST_STATUS_NORMAL("정상", 1),
POST_STATUS_REMOVE("샥제", 2),
POST_STATUS_MODIFY("수정", 3)

// 남자 또는 여자를 나타내는 값을 정의한다.
enum class Gender(var str:String, var num:Int){
MALE("male", 1),
FEMALE("female", 2)
}

// 사용자 설정
enum class UserType(var str:String, var num:Int){
USER_BUYER("UserBuyer", 0),
USER_SELLER("UserSeller", 1),
USER_ADMIN("UserAdmin", 2)
}

// 회원 상태를 나타내는 값을 정의한다
enum class UserState(var str:String, var num:Int){
USER_STATE_NORMAL("정상", 1),
USER_STATE_SIGNOUT("탈퇴", 2),
}

// Order
enum class OrderStatus(var str : String, var number : Int){
ORDER_STATUS_NORMAL("정상", 1)
}

enum class OrderProductType(var str : String, var number : Int){
ORDER_PRODUCT_TYPE_CROP("농산물", 1),
ORDER_PRODUCT_TYPE_FARM("주말농장", 2),
ORDER_PRODUCT_TYPE_ACTIVITY("체험활동", 3)
}

enum class OrderLabelType(var str : String, var number : Int){
ORDER_LABEL_TYPE_PAY_DONE("결제완료", 1),
ORDER_LABEL_TYPE_DELIVERY("배송중", 2),
ORDER_LABEL_TYPE_DELIVERY_DONE("배송완료", 3),
ORDER_LABEL_TYPE_CANCLE_APPLY("취소신청", 4),
ORDER_LABEL_TYPE_CANCLE_DONE("취소완료", 5),
ORDER_LABEL_TYPE_RETURN_APPLY("반품신청", 6),
ORDER_LABEL_TYPE_RETURN_DONE("반품완료", 7),
ORDER_LABEL_TYPE_EXCHANGE_APPLY("교환신청", 8),
ORDER_LABEL_TYPE_EXCHANGE_DONE("교환완료", 9),
ORDER_LABEL_TYPE_RESERV_DONE("예약완료", 10),
ORDER_LABEL_TYPE_RESERV_CANCLE("예약취소", 11);

companion object {
fun fromNumber(number: Int): String? {
return values().firstOrNull { it.number == number }?.str
}
}
}

enum class FarmStatus(var str : String, var number : Int){
FARM_STATUS_NORMAL("정상", 1),
FARM_STATUS_PAUSE("일시중지", 2),
FARM_STATUS_DELETE("삭제", 3)
}

enum class ActivityStatus(var str : String, var number : Int){
ACTIVITY_STATUS_NORMAL("정상", 1),
ACTIVITY_STATUS_PAUSE("일시중지", 2),
ACTIVITY_STATUS_DELETE("삭제", 3)
}

enum class FaqState(var str:String, var number:Int) {
FAQ_STATE_NORMAL("정상", 0),
FAQ_STATE_REMOVE("삭제", 1)
}

enum class NoticeState(var str:String, var number:Int) {
NOTICE_STATE_NORMAL("정상", 0),
NOTICE_STATE_REMOVE("삭제", 1)
}

enum class InquiryState(var str:String, var number:Int) {
INQUIRY_STATE_NORMAL("정상", 0),
INQUIRY_STATE_REMOVE("삭제", 1)
}
enum class InquiryType(var str: String, var number:Int) {
TYPE_CROP("농작물", 0),
TYPE_FARM("주말농장", 1),
TYPE_ACTIVITY("체험활동", 2),
TYPE_JOB("구인구직", 3),
TYPE_TOOLS("농기구", 4),
TYPE_COMMUNITY("커뮤니티", 5),
TYPE_OTHER("기타", 6)
}

enum class MyPageMyPostName(var str : String){
MY_PAGE_MY_POST_BOARD_FRAGMENT("MyPageMyPostBoardFragment"),
MY_PAGE_MY_POST_comment_FRAGMENT("MyPageMyPostCommentFragment"),
}

// 댓글 상태
enum class CommentStatus(var str:String, var number: Int) {
COMMENT_STATUS_NORMAL("정상", 1),
COMMENT_STATUS_REMOVE("삭제", 2),
COMMENT_STATUS_MODIFY("수정", 3)

enum class ReviewState(var str:String, var number:Int) {
REVIEW_STATE_NORMAL("정상", 0),
REVIEW_STATE_REMOVE("삭제", 1)
}

enum class ReviewType(var str:String, var number:Int) {
TYPE_CROP("농작물", 0),
TYPE_FARM("주말농장", 1),
TYPE_ACTIVITY("체험활동", 2)
}

// 농산품 상태
enum class CropStatus(var str:String, var num:Int){
NORMAL("정상", 1),
PAUSE("판매품 일시정지",2),
DELETE("판매품 삭제",3)
}
enum class PointStatus(var str:String, var number : Int){
POINT_STATE_NORMAL("정상", 1),
POINT_STATE_REMOVE("삭제", 2)
}

enum class PointType(var str : String, var number : Int){
POINT_TYPE_SAVE("적립", 1),
POINT_TYPE_USE("사용", 2),
POINT_TYPE_EXTINCTION("소멸", 3)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package kr.co.lion.farming_customer.activity

import android.graphics.Color
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.SystemClock
import android.view.MenuItem
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.google.android.material.transition.MaterialSharedAxis
Expand Down Expand Up @@ -42,6 +45,7 @@ class MainActivity : AppCompatActivity() {
activityMainBinding.apply {
bottomNavigation.apply {
// 초기화면 홈으로 세팅
bottomNavigation.setItemIconTintList(null)
selectedItemId = R.id.menuItemBottomNavigation_Home
setOnItemSelectedListener {
when(it.itemId){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
package kr.co.lion.farming_customer.activity
package kr.co.lion.farming_customer.activity.community

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.SystemClock
import android.util.Log
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.google.android.material.transition.MaterialSharedAxis
import kr.co.lion.farming_customer.CommunityFragmentName
import kr.co.lion.farming_customer.R
import kr.co.lion.farming_customer.ReviewFragmentName
import kr.co.lion.farming_customer.databinding.ActivityCommunityBinding
import kr.co.lion.farming_customer.fragment.community.CommunityModifyFragment
import kr.co.lion.farming_customer.fragment.community.CommunityReadFragment
import kr.co.lion.farming_customer.fragment.review.ReviewHistoryFragment
import kr.co.lion.farming_customer.fragment.review.ReviewTabActivityFragment
import kr.co.lion.farming_customer.fragment.review.ReviewTabCropFragment
import kr.co.lion.farming_customer.fragment.review.ReviewTabFarmFragment
import kr.co.lion.farming_customer.model.CommunityModel


class CommunityActivity : AppCompatActivity() {
lateinit var activityCommunityBinding: ActivityCommunityBinding

lateinit var model: CommunityModel

// 프래그먼트 객체를 담을 변수
var oldFragment: Fragment? = null
var newFragment: Fragment? = null
Expand All @@ -29,7 +30,15 @@ class CommunityActivity : AppCompatActivity() {
activityCommunityBinding = ActivityCommunityBinding.inflate(layoutInflater)
setContentView(activityCommunityBinding.root)

replaceFragment(CommunityFragmentName.COMMUNITY_READ_FRAGMENT, false, false, null)

val postIdx = intent.getIntExtra("postIdx", -1)

if (postIdx != -1) {
val readBundle = Bundle()
readBundle.putInt("postIdx", postIdx)

replaceFragment(CommunityFragmentName.COMMUNITY_READ_FRAGMENT, false, false, readBundle)
}
}

fun replaceFragment(name: CommunityFragmentName, addToBackStack:Boolean, isAnimate:Boolean, data:Bundle?, container:Int = R.id.containerCommunity){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kr.co.lion.farming_customer.activity
package kr.co.lion.farming_customer.activity.community

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
package kr.co.lion.farming_customer.activity
package kr.co.lion.farming_customer.activity.community

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.SystemClock
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.divider.MaterialDividerItemDecoration
import com.google.android.material.transition.MaterialSharedAxis
import kr.co.lion.farming_customer.CommunityAddFragmentName
import kr.co.lion.farming_customer.CommunitySearchFragmentName
import kr.co.lion.farming_customer.R
import kr.co.lion.farming_customer.databinding.ActivityCommunityAddBinding
import kr.co.lion.farming_customer.databinding.ActivityCommunitySearchBinding
import kr.co.lion.farming_customer.databinding.RowCommunityTabAllBinding
import kr.co.lion.farming_customer.fragment.community.CommunityAddFragment
import kr.co.lion.farming_customer.fragment.community.CommunitySearchFragment
import kr.co.lion.farming_customer.viewmodel.CommunityViewModel

class CommunitySearchActivity : AppCompatActivity() {
lateinit var activityCommunitySearchBinding: ActivityCommunitySearchBinding
Expand Down
Loading

0 comments on commit e7b2c1b

Please sign in to comment.