-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fourth Assignment(Retrofit라이브러리) #3
base: master
Are you sure you want to change the base?
Conversation
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.
예진아 과제하느라 고생했어 😊 서버통신 어려웠을텐데도 예진이는 이해력이 정말 빠른 것 같아 멋져멋져
우리조 짱 ~~~~ 👍🏻👍🏻👍🏻
val repotext1: String, | ||
val repotext2: String, | ||
val repotext3: String |
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.
예진아 여기도 저번에 말했던 것처럼 지금은 이렇게 해도 괜찮지만!! 협업할 때는 repoName, repoExplanation 이렇게 써주면 더 좋을 것 같아 😊😊😊
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.
아하!! 넵넵 앞으로 이름 주의해서 붙이겠습니다~!!ㅎㅎ
private fun initButtonClickEvent() { | ||
binding.button.setOnClickListener{ | ||
val requestLoginData = RequestLoginData( | ||
id = binding.idedit.text.toString(), | ||
password = binding.passedit.text.toString() | ||
) | ||
val call: Call<ResponseLoginData> = ServiceCreator.soptService.postLogin(requestLoginData) | ||
call.enqueue(object : Callback<ResponseLoginData> { | ||
override fun onResponse( | ||
call: Call<ResponseLoginData>, | ||
response: Response<ResponseLoginData> | ||
){ | ||
if(response.isSuccessful){ | ||
val data = response.body()?.data | ||
Toast.makeText(this@SignInActivity, "로그인 성공", Toast.LENGTH_SHORT).show() | ||
startHomeActivity() | ||
}else { | ||
Toast.makeText( | ||
this@SignInActivity, | ||
"아이디/비밀번호를 확인해주세요!", | ||
Toast.LENGTH_SHORT | ||
).show() |
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.
👍🏻 좋아요 !!!! Callback 서버통신 연습해보다가 혹시 더 공부하고 싶으면 Rxjava 문법으로 좀 다르게 구현할 수 있는데 참고해봤으면 좋겠어 ~~~!!
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.
오호 Rxjava 문법 한 번 공부해보겠습니당~~!!
No description provided.