-
Notifications
You must be signed in to change notification settings - Fork 8
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
[AN/USER] 안드로이드 네비게이션을 적용한다. (#758) #781
Merged
Merged
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
64e8759
feat: 학교 상세 도메인 모델 추가
EmilyCh0 8469319
feat: SchoolRepository 정의
EmilyCh0 5ef793a
feat: 테스트용 FakeSchool 추가
EmilyCh0 2aa3b2b
feat: SchoolDefaultRepository 임시 구현 (Fake 데이터 리턴)
EmilyCh0 61d0ffe
feat: 학교 상세 dto 추가
EmilyCh0 b48c2bf
feat: SchoolDetailUiState 정의
EmilyCh0 6eb05c6
feat: SchoolDetailViewModel 구현
EmilyCh0 d6cd393
feat: SchoolDetailFragment 구현
EmilyCh0 bc6da8e
feat: UiState 분리
EmilyCh0 d1f1f2b
feat: FakeSchool 소셜미디어 데이터 추가
EmilyCh0 f74935f
feat: SchoolDetailFragment 뷰 수정
EmilyCh0 5e724f6
move: 패키지 위치 변경
EmilyCh0 3832327
feat: 상단 뒤로 가기 버튼
EmilyCh0 cc91707
feat: schoolId 추가
EmilyCh0 a025518
fix: dday view 수정
EmilyCh0 b555447
feat: 북마크
EmilyCh0 60357d6
Merge branch 'dev' into feat/#697
EmilyCh0 2a85266
fix: resolve conflict
EmilyCh0 702afb4
refactor: ktlint check
EmilyCh0 48848ad
refactor: ktlint check
EmilyCh0 7a30d1c
refactor: Fake 리포지토리명 변경
EmilyCh0 f1c5aec
refactor: id 카멜케이스로 수정
EmilyCh0 52824ad
refactor: FakeSchoolRepository 주석 삭제
EmilyCh0 99f08bc
chore(presentation): 네비게이션 의존성 추가
re4rk 99f71f4
feat(home): 네비게이션 그래프 추가
re4rk 15d7e1e
chore(presentation): safeargs 추가
re4rk a20b566
feat(presentation): 컨트롤러 사용하도록 추가
re4rk 3c508c6
feat(presentation): 탭마다 스택이 쌓이도록 변경
re4rk 924436c
feat(presentation): 네비게이션 적용
re4rk 5bebc61
Merge remote-tracking branch 'origin/dev' into feat/#758
re4rk 160cd19
Merge remote-tracking branch 'origin/dev' into feat/#758
re4rk a1618b0
refactor(Artist): 네비게이션 시 리프래시 되지 않도록 수정
re4rk aef1700
refactor(FestivalDetail): 네비게이션 시 리프래시 되지 않도록 수정
re4rk 722c78b
refactor(FestivalDetail): 불필요한 코드 제거
re4rk 1e5d425
refactor(FestivalDetail): 불필요한 코드 제거
re4rk 9794fe7
refactor(SchoolDetail): 사용하지 않는 모듈 제거
re4rk 9f720ad
refactor(presentation): 불필요한 바인드 분기 제거
re4rk 89b9b80
refactor(home): 화면마다 변경되게 변경
re4rk 18973de
refactor(home): 화면 이동이 모두 백스택에 쌓이도록 변경
re4rk ac3c717
feat: 축제 목록에서 축제 상세 이동 시 애니메이션 추가
SeongHoonC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...ation/src/main/java/com/festago/festago/presentation/ui/artistdetail/ArtistDetailEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.festago.festago.presentation.ui.artistdetail | ||
|
||
sealed interface ArtistDetailEvent { | ||
class ShowArtistDetail(val artistId: Long) : ArtistDetailEvent | ||
|
||
class ShowFestivalDetail(val festivalId: Long) : ArtistDetailEvent | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,12 @@ import android.view.ViewGroup | |
import android.widget.TextView | ||
import androidx.appcompat.content.res.AppCompatResources | ||
import androidx.fragment.app.Fragment | ||
import androidx.fragment.app.FragmentTransaction | ||
import androidx.fragment.app.commit | ||
import androidx.fragment.app.viewModels | ||
import androidx.navigation.fragment.findNavController | ||
import androidx.navigation.fragment.navArgs | ||
import com.festago.festago.presentation.R | ||
import com.festago.festago.presentation.databinding.FragmentFestivalDetailBinding | ||
import com.festago.festago.presentation.databinding.ItemMediaBinding | ||
import com.festago.festago.presentation.ui.artistdetail.ArtistDetailFragment | ||
import com.festago.festago.presentation.ui.festivaldetail.adapter.stage.StageListAdapter | ||
import com.festago.festago.presentation.ui.festivaldetail.uiState.FestivalDetailUiState | ||
import com.festago.festago.presentation.util.repeatOnStarted | ||
|
@@ -25,20 +24,23 @@ import java.time.LocalDate | |
|
||
@AndroidEntryPoint | ||
class FestivalDetailFragment : Fragment() { | ||
|
||
private var _binding: FragmentFestivalDetailBinding? = null | ||
private val binding get() = _binding!! | ||
|
||
private val vm: FestivalDetailViewModel by viewModels() | ||
|
||
private val args: FestivalDetailFragmentArgs by navArgs() | ||
|
||
private lateinit var adapter: StageListAdapter | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle?, | ||
): View { | ||
_binding = FragmentFestivalDetailBinding.inflate(inflater) | ||
if (_binding == null) { | ||
_binding = FragmentFestivalDetailBinding.inflate(inflater) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. null이 아닌 게 어떤 경우인가요?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 베르가 말해준 생명주기를 보고 롤백했습니다. |
||
return binding.root | ||
} | ||
|
||
|
@@ -49,7 +51,7 @@ class FestivalDetailFragment : Fragment() { | |
} | ||
|
||
private fun initView() { | ||
val id = requireArguments().getLong(FESTIVAL_ID) | ||
val id = args.festivalId | ||
adapter = StageListAdapter() | ||
binding.rvStageList.adapter = adapter | ||
vm.loadFestivalDetail(id) | ||
|
@@ -144,11 +146,11 @@ class FestivalDetailFragment : Fragment() { | |
private fun handleEvent(event: FestivalDetailEvent) { | ||
when (event) { | ||
is FestivalDetailEvent.ShowArtistDetail -> { | ||
requireActivity().supportFragmentManager.commit { | ||
add(R.id.fcvHomeContainer, ArtistDetailFragment.newInstance(event.artistId)) | ||
setTransition(FragmentTransaction.TRANSIT_FRAGMENT_MATCH_ACTIVITY_OPEN) | ||
addToBackStack(null) | ||
} | ||
findNavController().navigate( | ||
FestivalDetailFragmentDirections.actionFestivalDetailFragmentToArtistDetailFragment( | ||
event.artistId, | ||
), | ||
) | ||
} | ||
} | ||
} | ||
|
@@ -157,14 +159,4 @@ class FestivalDetailFragment : Fragment() { | |
_binding = null | ||
super.onDestroyView() | ||
} | ||
|
||
companion object { | ||
private const val FESTIVAL_ID = "FESTIVAL_ID" | ||
|
||
fun newInstance(id: Long) = FestivalDetailFragment().apply { | ||
arguments = Bundle().apply { | ||
putLong(FESTIVAL_ID, id) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 화면으로 navigate 할 때 항상 onDestroyView 가 불립니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null로 만들어주는게 onDestory인줄 알았는데 착각했네요
찾아보니 네비게이션 action은 무조건 replace로 작동하고
add처럼 동작하려면 dialog태그를 사용해야합니다.