-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat/#14 닉네임 입력 화면 개발
- Loading branch information
Showing
44 changed files
with
1,112 additions
and
856 deletions.
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
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/owori/android/presenter/policy/AgreeServiceConditionFragment.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,23 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.databinding.FragmentAgreeServiceConditionBinding | ||
|
||
class AgreeServiceConditionFragment : BaseFragment<FragmentAgreeServiceConditionBinding, AgreeServiceConditionViewModel>(R.layout.fragment_agree_service_condition) { | ||
override val viewModel: AgreeServiceConditionViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
|
||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/owori/android/presenter/policy/AgreeServiceConditionViewModel.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,17 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.lifecycle.LiveData | ||
import com.owori.android.core.BaseViewModel | ||
import com.owori.android.presenter.util.SingleLiveEvent | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class AgreeServiceConditionViewModel @Inject constructor(): BaseViewModel() { | ||
private val _btnNext: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val btnNext: LiveData<Unit> = _btnNext | ||
|
||
fun onClickCheckButton() { | ||
_btnNext.call() | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/owori/android/presenter/policy/BirthDateFragment.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,30 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
|
||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.core.navigateTo | ||
import com.owori.android.databinding.FragmentBirthDateBinding | ||
|
||
|
||
class BirthDateFragment : BaseFragment<FragmentBirthDateBinding, BirthDateViewModel>(R.layout.fragment_birth_date) { | ||
override val viewModel: BirthDateViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
with(viewModel) { | ||
btnNext.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_birthDateFragment_to_familyConnectFragment) | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/owori/android/presenter/policy/BirthDateViewModel.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,17 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.lifecycle.LiveData | ||
import com.owori.android.core.BaseViewModel | ||
import com.owori.android.presenter.util.SingleLiveEvent | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class BirthDateViewModel @Inject constructor(): BaseViewModel() { | ||
private val _btnNext: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val btnNext: LiveData<Unit> = _btnNext | ||
|
||
fun onClickCheckButton() { | ||
_btnNext.call() | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/owori/android/presenter/policy/FamilyConnectFragment.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,33 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
|
||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.core.navigateTo | ||
import com.owori.android.databinding.FragmentFamilyConnectBinding | ||
|
||
|
||
class FamilyConnectFragment : BaseFragment<FragmentFamilyConnectBinding, FamilyConnectViewModel>(R.layout.fragment_family_connect) { | ||
override val viewModel: FamilyConnectViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
with(viewModel) { | ||
returnLogin.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_familyConnectFragment_to_inputFamilyCodeFragment) | ||
} | ||
btnNext.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_familyConnectFragment_to_groupFragment) | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/owori/android/presenter/policy/FamilyConnectViewModel.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,24 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.lifecycle.LiveData | ||
import com.owori.android.core.BaseViewModel | ||
import com.owori.android.presenter.util.SingleLiveEvent | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class FamilyConnectViewModel @Inject constructor(): BaseViewModel() { | ||
|
||
private val _btnNext: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val btnNext: LiveData<Unit> = _btnNext | ||
private val _returnLogin: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val returnLogin: LiveData<Unit> = _returnLogin | ||
|
||
fun onClickCheckButton() { | ||
_btnNext.call() | ||
} | ||
|
||
fun onClickBackButton() { | ||
_returnLogin.call() | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/owori/android/presenter/policy/GroupFragment.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,30 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
|
||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.core.navigateTo | ||
import com.owori.android.databinding.FragmentGroupBinding | ||
|
||
|
||
class GroupFragment : BaseFragment<FragmentGroupBinding, GroupViewModel>(R.layout.fragment_group) { | ||
override val viewModel: GroupViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
with(viewModel) { | ||
btnNext.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_groupFragment_to_shareCodeFragment) | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/owori/android/presenter/policy/GroupViewModel.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,17 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.lifecycle.LiveData | ||
import com.owori.android.core.BaseViewModel | ||
import com.owori.android.presenter.util.SingleLiveEvent | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class GroupViewModel @Inject constructor(): BaseViewModel() { | ||
private val _btnNext: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val btnNext: LiveData<Unit> = _btnNext | ||
|
||
fun onClickCheckButton() { | ||
_btnNext.call() | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/owori/android/presenter/policy/InputFamilyCodeFragment.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,30 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
|
||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.core.navigateTo | ||
import com.owori.android.databinding.FragmentInputFamilyCodeBinding | ||
|
||
|
||
class InputFamilyCodeFragment : BaseFragment<FragmentInputFamilyCodeBinding, InputFamilyCodeViewModel>(R.layout.fragment_input_family_code) { | ||
override val viewModel: InputFamilyCodeViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
with(viewModel) { | ||
btnNext.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_inputFamilyCodeFragment_to_agreeServiceConditionFragment) | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/owori/android/presenter/policy/InputFamilyCodeViewModel.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,17 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.lifecycle.LiveData | ||
import com.owori.android.core.BaseViewModel | ||
import com.owori.android.presenter.util.SingleLiveEvent | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class InputFamilyCodeViewModel @Inject constructor(): BaseViewModel() { | ||
private val _btnNext: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val btnNext: LiveData<Unit> = _btnNext | ||
|
||
fun onClickCheckButton() { | ||
_btnNext.call() | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
app/src/main/java/com/owori/android/presenter/policy/NickNameFragment.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,51 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
|
||
import androidx.core.content.ContextCompat | ||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.core.navigateTo | ||
import com.owori.android.databinding.FragmentNickNameBinding | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class NickNameFragment: BaseFragment<FragmentNickNameBinding, NickNameViewModel>(R.layout.fragment_nick_name) { | ||
override val viewModel: NickNameViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
with(viewModel) { | ||
nickname.observe(viewLifecycleOwner) { | ||
setViewPagerButton(it) | ||
} | ||
|
||
returnLogin.observe(viewLifecycleOwner) { | ||
requireActivity().onBackPressedDispatcher.onBackPressed() | ||
} | ||
btnNext.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_nickNameFragment_to_birthDateFragment) | ||
} | ||
} | ||
} | ||
|
||
fun setViewPagerButton(nickname: String) { | ||
val isInputted = nickname.isNotEmpty() | ||
with(binding.viewpagerButton) { | ||
isEnabled = isInputted | ||
if(isInputted) { | ||
setTextColor(ContextCompat.getColor(requireContext(), R.color.white)) | ||
} else { | ||
setTextColor(ContextCompat.getColor(requireContext(), R.color.grey_909090)) | ||
} | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/owori/android/presenter/policy/NickNameViewModel.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,27 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import com.owori.android.core.BaseViewModel | ||
import com.owori.android.presenter.util.SingleLiveEvent | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class NickNameViewModel @Inject constructor(): BaseViewModel(){ | ||
val _nickname: MutableLiveData<String> = MutableLiveData("") | ||
val nickname: LiveData<String> = _nickname | ||
|
||
private val _returnLogin: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val returnLogin: LiveData<Unit> = _returnLogin | ||
private val _btnNext: SingleLiveEvent<Unit> = SingleLiveEvent() | ||
val btnNext: LiveData<Unit> = _btnNext | ||
|
||
fun onClickCheckButton() { | ||
_btnNext.call() | ||
} | ||
|
||
fun onClickBackButton() { | ||
_returnLogin.call() | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/owori/android/presenter/policy/ShareCodeFragment.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,30 @@ | ||
package com.owori.android.presenter.policy | ||
|
||
|
||
import androidx.fragment.app.viewModels | ||
import com.owori.android.R | ||
import com.owori.android.core.BaseFragment | ||
import com.owori.android.core.navigateTo | ||
import com.owori.android.databinding.FragmentShareCodeBinding | ||
|
||
|
||
class ShareCodeFragment : BaseFragment<FragmentShareCodeBinding, ShareCodeViewModel>(R.layout.fragment_share_code) { | ||
override val viewModel: ShareCodeViewModel by viewModels() | ||
override fun setBindingVariables() { | ||
with(binding) { | ||
vm = viewModel | ||
} | ||
} | ||
|
||
override fun initView() { | ||
|
||
} | ||
|
||
override fun initObserver() { | ||
with(viewModel) { | ||
btnNext.observe(viewLifecycleOwner) { | ||
navigateTo(R.id.action_shareCodeFragment_to_agreeServiceConditionFragment) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.