Skip to content

Vn cuong#8

Open
vunguyencuong wants to merge 3 commits intoSudo248:masterfrom
vunguyencuong:VNCuong
Open

Vn cuong#8
vunguyencuong wants to merge 3 commits intoSudo248:masterfrom
vunguyencuong:VNCuong

Conversation

@vunguyencuong
Copy link
Collaborator

No description provided.

Copy link
Owner

@Sudo248 Sudo248 left a comment

Choose a reason for hiding this comment

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

Các class anh đánh dấu ? để làm gì v em?
Bài của em nhìn rất giống bài của Việt, đến tên biến cũng giống
2 đứa tham khảo từ 1 nguồn à?


def fragment_version = "1.5.0"
implementation "androidx.fragment:fragment:$fragment_version"
implementation "androidx.fragment:fragment-ktx:$fragment_version"
Copy link
Owner

Choose a reason for hiding this comment

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

K nhất thiết phải dùng thư viện này

private var _binding: FragmentLoginBinding? = null
private val binding get() = _binding!!
var accounts:ArrayList<User> = arrayListOf()

Copy link
Owner

Choose a reason for hiding this comment

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

Nên dùng mutable list của kotlin nhé

}

binding.tvLogIn.setOnClickListener {
val FragmentLogin = LogInFragment()
Copy link
Owner

Choose a reason for hiding this comment

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

xem lại cách đặt tên biến


val bundle = Bundle()
FragmentLogin.arguments = bundle
bundle.putSerializable("acc",accounts)
Copy link
Owner

Choose a reason for hiding this comment

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

em tạo hẳn 1 mảng để push 1 phần tử rồi chuyển nguyên nó sang màn login à?

@@ -0,0 +1,24 @@
package com.sudo.androidd20.data
Copy link
Owner

Choose a reason for hiding this comment

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

?

val usernameError: Int? = null,
val passwordError: Int? = null,
val isDataValid: Boolean = false
) No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

?

super.onDestroyView()
_binding = null
}
} No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

?

data class LoginResult(
val success: LoggedInUserView? = null,
val error: Int? = null
) No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

?

private fun isPasswordValid(password: String): Boolean {
return password.length > 5
}
} No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

?

}
throw IllegalArgumentException("Unknown ViewModel class")
}
} No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

?

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