Open
Conversation
chattymin
reviewed
Nov 11, 2023
| class HomeActivity : AppCompatActivity() { | ||
| private lateinit var binding: ActivityHomeBinding | ||
| private var openFAB = false | ||
| private val WRITE_EXTERNAL_STORAGE_REQUEST_CODE = 1 |
Member
There was a problem hiding this comment.
이것도 companion object에 넣으면 더 좋을 것 같습니다!
Comment on lines
+16
to
+17
| private val View_Myprofile = 0 | ||
| private val View_Friend = 1 |
stellar-halo
left a comment
There was a problem hiding this comment.
FAB에 이은 스크린 캡쳐까지,, 멋있는 코드들 잘 보고 갑니다! 너무 잘해요 ^0^
Comment on lines
+5
to
+6
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
| class DoAndroidFragment : Fragment() { | ||
| private var _binding : FragmentDoAndroidBinding ? = null | ||
| private val binding: FragmentDoAndroidBinding | ||
| get() = requireNotNull(_binding){"바인딩 에러"} |
There was a problem hiding this comment.
요기는 string으로 뺴주시면 좋을 것 같아요~ getString(R.string.xxx)으로 사용하실 수 있습니다!
| return if (user_id != null && user_major != null) { | ||
| MyPageFragment.newInstance(user_id, user_major) | ||
| } else { | ||
| throw IllegalArgumentException("데이터가 없어요!") |
|
|
||
| companion object { | ||
| fun createMyPageFragment(user_id: String?, user_major: String?): MyPageFragment { | ||
| return if (user_id != null && user_major != null) { |
There was a problem hiding this comment.
isUserExist 요런식으로 따로 조건변수를 빼보는 건 어떤가요?
Comment on lines
+56
to
+79
| when (it.itemId) { | ||
| R.id.menu_home -> { | ||
| replaceFragment(HomeFragment()) | ||
| true | ||
| } | ||
|
|
||
| R.id.menu_do_android -> { | ||
| replaceFragment(DoAndroidFragment()) | ||
| true | ||
| } | ||
|
|
||
| R.id.menu_mypage -> { | ||
| try { | ||
| val user_id = intent?.getStringExtra("user_id") | ||
| val user_major = intent?.getStringExtra("user_major") | ||
| val myPageFragment = createMyPageFragment(user_id, user_major) | ||
| replaceFragment(myPageFragment) | ||
| } catch (e: IllegalArgumentException) { | ||
| Toast.makeText(this, e.message, Toast.LENGTH_SHORT).show() | ||
| } | ||
| true | ||
| } | ||
|
|
||
| else -> false |
There was a problem hiding this comment.
sealed class 공부해보시는 걸 추천드립니다! else가 없어도 된다는 점,,ㅎㅎ
| } | ||
|
|
||
| binding.fabShare.setOnClickListener { | ||
| Toast.makeText(this, "공유하는 중", Toast.LENGTH_SHORT).show() |
Comment on lines
+30
to
+32
| val MainAdapter = MainAdapter(requireContext()) | ||
| binding.rvFriends.adapter = MainAdapter | ||
| MainAdapter.profileList = viewModel.mockUserProfileLists |
| UserProfile.User( | ||
| profileImage = R.drawable.myimage, | ||
| name = "박강희", | ||
| message = "오늘 생일티비!" |
Comment on lines
+22
to
+24
| idTextView.text = "$inputTextId" | ||
| majorTextView.text = "$inputTextMajor" | ||
| nameTextView.text = "$inputTextName" |
| val binding = ItemFriendBinding.inflate(LayoutInflater.from(parent.context), parent, false) | ||
| FriendViewHolder(binding) | ||
| } | ||
| else -> throw IllegalArgumentException("유효하지 않소") |
lsakee
reviewed
Nov 12, 2023
Comment on lines
+12
to
+14
| Glide.with(ivProfile) | ||
| .load(userUserProfileData.profileImage) | ||
| .into(ivProfile) |
| return if (user_id != null && user_major != null) { | ||
| MyPageFragment.newInstance(user_id, user_major) | ||
| } else { | ||
| throw IllegalArgumentException("데이터가 없어요!") |
Comment on lines
+33
to
+36
| loginIntent.putExtra("entered_id", enteredId) | ||
| loginIntent.putExtra("entered_password", enteredPassword) | ||
| loginIntent.putExtra("entered_Major", enteredMajor) | ||
| loginIntent.putExtra("entered_Name", enteredName) |
jihyun0v0
reviewed
Nov 12, 2023
| with(binding) { | ||
| Glide.with(ivProfile) | ||
| .load(userUserProfileData.profileImage) | ||
| .into(ivProfile) |
jihyun0v0
reviewed
Nov 12, 2023
| return if (user_id != null && user_major != null) { | ||
| MyPageFragment.newInstance(user_id, user_major) | ||
| } else { | ||
| throw IllegalArgumentException("데이터가 없어요!") |
There was a problem hiding this comment.
error handling까지 추가한 거 좋네요!! 배워갑니다...끙차끙차
jihyun0v0
reviewed
Nov 12, 2023
| } | ||
| binding.fabCapture.setOnClickListener { | ||
| takeScreenshot() | ||
| } |
jihyun0v0
reviewed
Nov 12, 2023
Comment on lines
+13
to
+15
| Glide.with(ivProfile) | ||
| .load(userUserProfileData.profileImage) | ||
| .into(ivProfile) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
KakaoTalk_20231110_155335782.mp4
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
카메라 버튼 누르면 전체화면 캡쳐되게 구현하고 싶었는데 자꾸만 저장된 사진이 0 B라고 뜨네욥.. 어떻게 고쳐야 할 지 더 생각해보겠슴다
코리 달아주시면 수정할게요!