-
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
Feat/week04 xml #5
base: develop-xml
Are you sure you want to change the base?
Conversation
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/java/com/sopt/now/MainActivity.kt
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.
์๊ณ ํ์ จ์ต๋๋ค~
|
||
binding.rvFriends.run { | ||
adapter = concatAdapter | ||
layoutManager = LinearLayoutManager(requireContext()) |
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.
xml์์ LayoutManager ์ค์ ํด์ฃผ์ ์ ์ฌ๊ธฐ์ ๋ฐ๋ก ๋ ์ค์ ์ ํ์ ๋ ๋ ๊ฒ ๊ฐ์์!
binding.textNickname.text = getString(R.string.nickname, nickname) | ||
binding.textPhone.text = phone | ||
binding.textId.text = id | ||
binding.changePw.setOnClickListener { | ||
Log.d("MyPapgeFragment", "go ChangePasswordActivity") | ||
val intentChangePassword = Intent(activity, ChangePasswordActivity::class.java).apply { | ||
putExtra("memberId", memberID) | ||
} | ||
startActivity(intentChangePassword) | ||
} | ||
|
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.
ํจ์ํ ํด์ฃผ์๋ฉด ์ฝ๊ธฐ ๋ ์ข์ ๊ฑฐ ๊ฐ์์!
binding.run { | ||
ivProfile.setImageResource(friendData.profileImage) |
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.
์ค binding.run ์ฌ์ฉํ์ จ๋ค์
if (response.isSuccessful) { | ||
userId = response.body()!!.data.authenticationId | ||
userNickname = response.body()!!.data.nickname | ||
userPhone = response.body()!!.data.phone |
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.
response.body()์ ์ฌ๋ฌ ๋ฒ ์ ๊ทผํ๋ ๊ฑธ ์กธ์ฌ์ ์ฝ๋๋ฅผ ๊ฐ๋จํ๊ฒ ํ ์ ์์๊น์
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.
!! ์์ฐ๋ ๋ฐฉ๋ฒ๋ ์์ ๊ฒ ๊ฐ์์
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 initViews() { | ||
val memberId = intent.getIntExtra("memberId", 0) |
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.
initViews๋ผ๋ ํจ์๋ช ์ ํด๋น๋๋ ๊ธฐ๋ฅ๋ค์ธ๊ฐ์?
_binding = null | ||
} | ||
|
||
private val myProfile = listOf( |
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.
AAC Viewmodel์ฌ์ฉํด์ ๋ฐ์ดํฐ ๊ด๋ฆฌํด๋ด๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค
_binding = FragmentMypageBinding.inflate(inflater, container, false) | ||
return binding.root | ||
|
||
|
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.
Ctrl + Alt + L ํ์ฉํด ๋ณด์ธ์ฉ
|
||
} | ||
|
||
//class SignUpActivity : AppCompatActivity() { |
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.
ํ์์๋ ์ฝ๋๋ ์ฃผ์์ฒ๋ฆฌ ํ๊ธฐ๋ณด๋จ ๊ทธ๋ฅ ์ง์์ฃผ์ ๋ ๋ ๊ฒ ๊ฐ์ต๋๋ค
if (response.isSuccessful) { | ||
userId = response.body()!!.data.authenticationId | ||
userNickname = response.body()!!.data.nickname | ||
userPhone = response.body()!!.data.phone |
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.
!! ์์ฐ๋ ๋ฐฉ๋ฒ๋ ์์ ๊ฒ ๊ฐ์์
|
||
fun setFriendList(friendList: List<Friend>) { | ||
this.friendList = friendList.toList() | ||
notifyDataSetChanged() |
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.
notifyDataSetChanged์ ๋จ์ ์ด ๋ญ๊น์?
๐ PR ์์ฝ
๐ฑ ์์ ํ ๋ด์ฉ
4์ฃผ์ฐจ xml ํ์๊ณผ์
๐ฑ PR ํฌ์ธํธ
API๋ฅผ ํตํด ํ์๊ฐ์ , ๋ก๊ทธ์ธ , ๋น๋ฐ๋ฒํธ ๋ณ๊ฒฝ ๊ตฌํ
๋ก๊ทธ์ธ์ด ๋๊ณ ๋๋ฉด ์ด์ ์คํ์ ์ง์ ๋ค๋ก๊ฐ๊ธฐ ๋ฒํผ ํด๋ฆญ์ ๋ก๊ทธ์ธ์ผ๋ก ๋์๊ฐ์ง ์๋๋ก ํจ
week04_xml.mp4