-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: 페이지연동, 정규식 #6
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
Open
hangye0l
wants to merge
18
commits into
develop
Choose a base branch
from
features
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c81dcf6
refactor: 페이지연동, 정규식
hangye0l 91f6a2f
Feature/euisoo/2 map graph (#7)
KimEuiSoo e38ad2c
refactor: 페이지연동, 정규식
hangye0l 9ed61cd
Merge remote-tracking branch 'origin/features' into features
hangye0l 46595b9
test
KimEuiSoo d9fb033
Feature/3 map route line (#8)
KimEuiSoo f703ce7
Feature/4 map server (#9)
KimEuiSoo dfdf097
Feature/community (#10)
Four-Star 4559b37
refactor: 코드 리팩토링
KimEuiSoo 8195df1
feat : apk 추출 수정
Four-Star 0a7bb9f
refactor: 카카오 구현
hangye0l 0433b69
refactor: 카카오 구현
hangye0l ea2fa9f
refactor: 카카오 로그인 구현
hangye0l 2a5682e
refactor: 카카오 로그인 구현
hangye0l 4010a87
refactor: 카카오 로그인 구현
hangye0l a0f1217
refactor: 카카오 구현
hangye0l f3f6046
Merge remote-tracking branch 'origin/features' into features
hangye0l f0e7db7
refactor: 카카오 구현
hangye0l 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
44 changes: 40 additions & 4 deletions
44
app/src/main/java/com/example/daejangjung2/feature/auth/login/LoginFirstActivity.kt
This file contains hidden or 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 |
|---|---|---|
| @@ -1,30 +1,66 @@ | ||
| package com.example.daejangjung2.feature.auth.login | ||
|
|
||
| import android.content.Intent | ||
| import android.graphics.Color | ||
| import android.os.Bundle | ||
| import android.view.View | ||
| import android.widget.Toast | ||
| import androidx.activity.viewModels | ||
| import androidx.core.widget.addTextChangedListener | ||
| import com.example.daejangjung2.R | ||
| import com.example.daejangjung2.common.base.BindingActivity | ||
| import com.example.daejangjung2.databinding.ActivityLoginBinding | ||
| import com.example.daejangjung2.databinding.ActivityLoginFirstBinding | ||
| import com.example.daejangjung2.feature.auth.signup.SignupSecondActivity | ||
| import com.example.daejangjung2.feature.main.MainActivity | ||
|
|
||
| class LoginFirstActivity : BindingActivity<ActivityLoginBinding>(R.layout.activity_login_first ) { | ||
| class LoginFirstActivity : BindingActivity<ActivityLoginFirstBinding>(R.layout.activity_login_first) { | ||
| private val viewModel: LoginViewModel by viewModels { LoginViewModel.Factory } | ||
|
|
||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| binding.vm = viewModel | ||
| binding.lifecycleOwner = this | ||
|
|
||
| if(viewModel.isLogin.value){ | ||
| // 모든 입력 필드에 대해 텍스트 변경 리스너를 추가 | ||
| binding.etFindEmail.addTextChangedListener { checkFieldsForEmptyValues() } | ||
|
|
||
| binding.btnContinue.setOnClickListener { | ||
| // 버튼이 활성화되어 있을 때만 다음 화면으로 이동 | ||
| if (binding.btnContinue.isEnabled) { | ||
| val intent = Intent(this, LoginSecondActivity::class.java) | ||
| startActivity(intent) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // 모든 필드의 빈칸 여부를 확인하고 버튼 상태를 변경하는 함수 | ||
| private fun checkFieldsForEmptyValues() { | ||
| val email = binding.etFindEmail.text.toString().trim() | ||
|
|
||
| val allFieldsFilled = email.isNotEmpty() | ||
|
|
||
| // 모든 필드가 비어있지 않으면 버튼 활성화 | ||
| if (allFieldsFilled) { | ||
| binding.btnContinue.isEnabled = true | ||
| binding.btnContinue.setBackgroundColor(Color.parseColor("#4682FF")) // 진한 파란색으로 변경 | ||
hangye0l marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } else { | ||
| binding.btnContinue.isEnabled = false | ||
| } | ||
|
|
||
|
|
||
|
|
||
| if (viewModel.isLogin.value) { | ||
| login() | ||
| } | ||
| } | ||
|
|
||
| private fun login(){ | ||
| private fun login() { | ||
| startActivity(MainActivity.getIntent(this@LoginFirstActivity)) | ||
| finish() | ||
| } | ||
|
|
||
| companion object { | ||
| private const val MOVE_MAIN_AFTER_LOGIN = "move_main_after_login_tag" | ||
| } | ||
| } | ||
| } | ||
48 changes: 47 additions & 1 deletion
48
app/src/main/java/com/example/daejangjung2/feature/auth/login/LoginFourthActivity.kt
This file contains hidden or 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
35 changes: 34 additions & 1 deletion
35
app/src/main/java/com/example/daejangjung2/feature/auth/login/LoginSecondActivity.kt
This file contains hidden or 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
68 changes: 68 additions & 0 deletions
68
app/src/main/java/com/example/daejangjung2/feature/auth/login/LoginSecondActivity2.kt
This file contains hidden or 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,68 @@ | ||
| package com.example.daejangjung2.feature.auth.login | ||
|
|
||
| import android.content.Intent | ||
| import android.graphics.Color | ||
| import android.os.Bundle | ||
| import android.view.View | ||
| import androidx.activity.viewModels | ||
| import androidx.core.widget.addTextChangedListener | ||
| import com.example.daejangjung2.R | ||
| import com.example.daejangjung2.common.base.BindingActivity | ||
| import com.example.daejangjung2.databinding.ActivityLoginBinding | ||
| import com.example.daejangjung2.databinding.ActivityLoginSecond2Binding | ||
| import com.example.daejangjung2.databinding.ActivityLoginSecondBinding | ||
| import com.example.daejangjung2.feature.main.MainActivity | ||
|
|
||
| class LoginSecondActivity2 : BindingActivity<ActivityLoginSecond2Binding>(R.layout.activity_login_second2 ) { | ||
| private val viewModel: LoginViewModel by viewModels { LoginViewModel.Factory } | ||
|
|
||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| binding.vm = viewModel | ||
| binding.lifecycleOwner = this | ||
|
|
||
| // 모든 입력 필드에 대해 텍스트 변경 리스너를 추가 | ||
| binding.etCode.addTextChangedListener { checkFieldsForEmptyValues() } | ||
|
|
||
| binding.btnContinue.setOnClickListener { | ||
| // 버튼이 활성화되어 있을 때만 다음 화면으로 이동 | ||
| if (binding.btnContinue.isEnabled) { | ||
| val intent = Intent(this, LoginFourthActivity::class.java) | ||
| startActivity(intent) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // 모든 필드의 빈칸 여부를 확인하고 버튼 상태를 변경하는 함수 | ||
| private fun checkFieldsForEmptyValues() { | ||
| val code = binding.etCode.text.toString().trim() | ||
|
|
||
| val allFieldsFilled = code.isNotEmpty() | ||
|
|
||
| // 모든 필드가 비어있지 않으면 버튼 활성화 | ||
| if (allFieldsFilled) { | ||
| binding.btnContinue.isEnabled = true | ||
| binding.btnContinue.setBackgroundColor(Color.parseColor("#4682FF")) // 진한 파란색으로 변경 | ||
| } else { | ||
| binding.btnContinue.isEnabled = false | ||
| } | ||
|
|
||
| if(viewModel.isLogin.value){ | ||
| login() | ||
| } | ||
|
|
||
|
|
||
| if(viewModel.isLogin.value){ | ||
| login() | ||
| } | ||
| } | ||
|
|
||
| private fun login(){ | ||
| startActivity(MainActivity.getIntent(this@LoginSecondActivity2)) | ||
| finish() | ||
| } | ||
|
|
||
| companion object { | ||
| private const val MOVE_MAIN_AFTER_LOGIN = "move_main_after_login_tag" | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.