Skip to content

Fourth Assignment(Retrofit라이브러리) - #3

Open
cyj2825 wants to merge 10 commits into
masterfrom
seminar_4
Open

Fourth Assignment(Retrofit라이브러리)#3
cyj2825 wants to merge 10 commits into
masterfrom
seminar_4

Conversation

@cyj2825

@cyj2825 cyj2825 commented May 16, 2021

Copy link
Copy Markdown
Member

No description provided.

@cyj2825
cyj2825 requested review from cjsjizzu and jooyae May 16, 2021 12:46
@cyj2825 cyj2825 self-assigned this May 16, 2021

@jooyae jooyae left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

예진아 과제하느라 고생했어 😊 서버통신 어려웠을텐데도 예진이는 이해력이 정말 빠른 것 같아 멋져멋져
우리조 짱 ~~~~ 👍🏻👍🏻👍🏻

Comment on lines +4 to +6
val repotext1: String,
val repotext2: String,
val repotext3: String

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

예진아 여기도 저번에 말했던 것처럼 지금은 이렇게 해도 괜찮지만!! 협업할 때는 repoName, repoExplanation 이렇게 써주면 더 좋을 것 같아 😊😊😊

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

아하!! 넵넵 앞으로 이름 주의해서 붙이겠습니다~!!ㅎㅎ

Comment on lines +28 to +49
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()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍🏻 좋아요 !!!! Callback 서버통신 연습해보다가 혹시 더 공부하고 싶으면 Rxjava 문법으로 좀 다르게 구현할 수 있는데 참고해봤으면 좋겠어 ~~~!!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

오호 Rxjava 문법 한 번 공부해보겠습니당~~!!

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.

2 participants