Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] week calendar #38

Merged
merged 13 commits into from
Aug 11, 2023
Merged

[FIX] week calendar #38

merged 13 commits into from
Aug 11, 2023

Conversation

Amepistheo
Copy link
Collaborator

@Amepistheo Amepistheo commented Jul 31, 2023

개요

주간 캘린더 수정 및 값 넘기기

작업 사항

  • 주간 캘린더 MainActivity로 변경
  • 날짜 클릭 시 background resource 설정 완료
  • 클릭 된 날짜 값 넘기기 성공 (viewModel 사용)
  • 각 식당별로 값 제대로 넘어가는지 다시 확인해야할듯..

스크린샷 및 작동 영상

image

@Amepistheo Amepistheo requested a review from HI-JIN2 July 31, 2023 08:57
@Amepistheo Amepistheo linked an issue Jul 31, 2023 that may be closed by this pull request
1 task
Comment on lines +38 to +39
today = binding.date.text as String
day = binding.day.text as String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 as String을 붙여준 이유가 따로 있나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그 변환 가능한 속성이라서 String으로 자동 변환이 안된다는 오류 있어서 강제 변환 해줬습니당

Comment on lines 53 to 81
/*
binding.root.setOnClickListener {
// Update the selectedDate to the clicked date
selectedDate = today as String?
// Update the background of the clicked date
for(holder in allViewHolders){
holder.binding.weekCardview.setBackgroundResource(com.eatssu.android.R.drawable.ic_selector_background_white)
Log.d("searchfor", holder.toString())
}
selectedDate?.let { it1 -> Log.d("rootdata", it1) }
val bundle : Bundle = Bundle()
bundle.putString("calendardata", selectedDate)

val intent = Intent(binding.root.context, MainActivity::class.java)
intent.putExtra("calendardata", selectedDate)
ContextCompat.startActivity(binding.root.context, intent, null)

*//*val lunchFragment = LunchFragment()
lunchFragment.arguments = bundle*//*

*//*val caledarFragment = CalendarFragment()

lateinit var dataPassListener : onDataPassListener

dataPassListener = caledarFragment.context as onDataPassListener
dataPassListener.onDataPass(selectedDate)*//*

binding.weekCardview.setBackgroundResource(com.eatssu.android.R.drawable.selector_background_blue)
}*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기는 혹시 나중에 쓰일 코드인가요? 아니면 평생 쓰이지 않을 코드인가용?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapter에 있을 코드를 MainActivity로 옮겨서 삭제할게요!

android:fontFamily="@font/noto_medium"
android:text="저작권 도용 의심 (사진 등)" />
android:text="저작권 도용 의심 (사진 등)" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text는 string.xml에 넣어주고 거기서 불러오는 식으로 사용해주세요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네! 신고하기 브랜치에서 변경할게용

@Amepistheo Amepistheo merged commit dd3be5f into main Aug 11, 2023
1 check failed
@Amepistheo Amepistheo deleted the 29-fix-지도-연동-문제-수정 branch August 11, 2023 14:51
@HI-JIN2 HI-JIN2 changed the title 29 fix week calendar [FIX] week calendar Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] 지도 연동 문제 수정
2 participants