Skip to content
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

Feat1/week3 #7

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open

Feat1/week3 #7

wants to merge 20 commits into from

Conversation

crownjoe
Copy link
Contributor

@crownjoe crownjoe commented Nov 9, 2023

πŸ“Œπ˜π˜΄π˜΄π˜Άπ˜¦π˜΄

πŸ“Žπ˜žπ˜°π˜³π˜¬ π˜‹π˜¦π˜΄π˜€π˜³π˜ͺ𝘱𝘡π˜ͺ𝘰𝘯

  • ν΄λ¦­ν•œ λ°”ν…€λ„€λΉ„κ²Œμ΄μ…˜ μ•„μ΄μ½˜ 색 λ°”κΎΈκΈ°
  • FAB
  • μΊ‘μ³λ²„νŠΌ ν΄λ¦­ν•˜λ©΄ 캑쳐 κ°€λŠ₯ν•˜κ²Œ λ§Œλ“€κΈ°

πŸ“·π˜šπ˜€π˜³π˜¦π˜¦π˜―π˜΄π˜©π˜°π˜΅

KakaoTalk_20231110_155335782.mp4

πŸ’¬π˜›π˜° π˜™π˜¦π˜·π˜ͺ𝘦𝘸𝘦𝘳𝘴

카메라 λ²„νŠΌ λˆ„λ₯΄λ©΄ 전체화면 캑쳐되게 κ΅¬ν˜„ν•˜κ³  μ‹Άμ—ˆλŠ”λ° 자꾸만 μ €μž₯된 사진이 0 B라고 λœ¨λ„€μš₯.. μ–΄λ–»κ²Œ 고쳐야 ν•  지 더 μƒκ°ν•΄λ³΄κ² μŠ΄λ‹€
코리 λ‹¬μ•„μ£Όμ‹œλ©΄ μˆ˜μ •ν• κ²Œμš”!

@crownjoe crownjoe added the πŸ“• ν•„μˆ˜ ν•„μˆ˜ 과제 label Nov 9, 2023
Copy link
Member

@chattymin chattymin left a comment

Choose a reason for hiding this comment

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

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€!! μ—­μ‹œ μ½”λ“œ μž˜μ§œμ‹œλ„€μš”

class HomeActivity : AppCompatActivity() {
private lateinit var binding: ActivityHomeBinding
private var openFAB = false
private val WRITE_EXTERNAL_STORAGE_REQUEST_CODE = 1
Copy link
Member

Choose a reason for hiding this comment

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

이것도 companion object에 λ„£μœΌλ©΄ 더 쒋을 것 κ°™μŠ΅λ‹ˆλ‹€!

Comment on lines +16 to +17
private val View_Myprofile = 0
private val View_Friend = 1
Copy link
Member

Choose a reason for hiding this comment

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

μš”κ²ƒλ„ companoin object둜!

Copy link

@stellar-halo stellar-halo left a comment

Choose a reason for hiding this comment

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

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" />

Choose a reason for hiding this comment

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

κΆŒν•œ ν—ˆκ°€κΉŒμ§€,,! λ©‹μžˆλ‹€

Choose a reason for hiding this comment

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

λ©‹μžˆλ‹€... 0-0

class DoAndroidFragment : Fragment() {
private var _binding : FragmentDoAndroidBinding ? = null
private val binding: FragmentDoAndroidBinding
get() = requireNotNull(_binding){"바인딩 μ—λŸ¬"}

Choose a reason for hiding this comment

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

μš”κΈ°λŠ” string으둜 λΊ΄μ£Όμ‹œλ©΄ 쒋을 것 κ°™μ•„μš”~ getString(R.string.xxx)으둜 μ‚¬μš©ν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€!

return if (user_id != null && user_major != null) {
MyPageFragment.newInstance(user_id, user_major)
} else {
throw IllegalArgumentException("데이터가 μ—†μ–΄μš”!")

Choose a reason for hiding this comment

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

λ§ˆμ°¬κ°€μ§€μž…λ‹ˆλ‹€!


companion object {
fun createMyPageFragment(user_id: String?, user_major: String?): MyPageFragment {
return if (user_id != null && user_major != null) {

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

sealed class κ³΅λΆ€ν•΄λ³΄μ‹œλŠ” κ±Έ μΆ”μ²œλ“œλ¦½λ‹ˆλ‹€! elseκ°€ 없어도 λœλ‹€λŠ” 점,,γ…Žγ…Ž

}

binding.fabShare.setOnClickListener {
Toast.makeText(this, "κ³΅μœ ν•˜λŠ” 쀑", Toast.LENGTH_SHORT).show()

Choose a reason for hiding this comment

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

string,,κ·€μ‹ ,,λ“±μž₯

Comment on lines +30 to +32
val MainAdapter = MainAdapter(requireContext())
binding.rvFriends.adapter = MainAdapter
MainAdapter.profileList = viewModel.mockUserProfileLists

Choose a reason for hiding this comment

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

ν•¨μˆ˜λ‘œ λ”°λ‘œ 빼주셔도 쒋을 λ“― ν•©λ‹ˆλ‹€!

UserProfile.User(
profileImage = R.drawable.myimage,
name = "박강희",
message = "였늘 생일티비!"

Choose a reason for hiding this comment

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

고맙티비!

Comment on lines +22 to +24
majorTextView.text = "$inputTextMajor"
nameTextView.text = "$inputTextName"

Choose a reason for hiding this comment

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

inputTextId μžμ²΄κ°€ string이 μ•„λ‹Œκ°€μš”?

val binding = ItemFriendBinding.inflate(LayoutInflater.from(parent.context), parent, false)
FriendViewHolder(binding)
}
else -> throw IllegalArgumentException("μœ νš¨ν•˜μ§€ μ•Šμ†Œ")

Choose a reason for hiding this comment

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

μ•Œκ² μ†Œ

Choose a reason for hiding this comment

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

ν”Όμ‹ν–ˆμ†Œ,,,

Copy link

@lsakee lsakee left a comment

Choose a reason for hiding this comment

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

κ³ μƒν–ˆμˆ¨λ‹ˆλ‹€

Comment on lines +12 to +14
Glide.with(ivProfile)
.load(userUserProfileData.profileImage)
.into(ivProfile)
Copy link

Choose a reason for hiding this comment

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

였 coilμ΄λž€ μ΄λ―Έμ§€λ‘œλ”λ„ 곡뢀해보면 쒋을덧! μ†νŠΈ κΏ€νŒμ— κΈ€μžˆμŒ!

return if (user_id != null && user_major != null) {
MyPageFragment.newInstance(user_id, user_major)
} else {
throw IllegalArgumentException("데이터가 μ—†μ–΄μš”!")
Copy link

Choose a reason for hiding this comment

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

였.. μ—λŸ¬λ₯Ό λ˜μ§€κ΅°μš”

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)
Copy link

Choose a reason for hiding this comment

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

ν•˜λ‚˜λ‘œ λ§Œλ“€κ³  μ‹Άμ§€μ•Šλ‚˜μš”?

with(binding) {
Glide.with(ivProfile)
.load(userUserProfileData.profileImage)
.into(ivProfile)

Choose a reason for hiding this comment

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

Glideκ°€ 무슨 κΈ°λŠ₯을 ν•˜λŠ” 클래슀 μΈκ°€μš”??

return if (user_id != null && user_major != null) {
MyPageFragment.newInstance(user_id, user_major)
} else {
throw IllegalArgumentException("데이터가 μ—†μ–΄μš”!")

Choose a reason for hiding this comment

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

error handlingκΉŒμ§€ μΆ”κ°€ν•œ κ±° μ’‹λ„€μš”!! λ°°μ›Œκ°‘λ‹ˆλ‹€...끙차끙차

}
binding.fabCapture.setOnClickListener {
takeScreenshot()
}

Choose a reason for hiding this comment

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

ν•¨μˆ˜ μͺΌκ°  κ±° 보기 νŽΈν•˜κ³  μ’‹λ„€μš”!

Comment on lines +13 to +15
Glide.with(ivProfile)
.load(userUserProfileData.profileImage)
.into(ivProfile)

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
πŸ“• ν•„μˆ˜ ν•„μˆ˜ 과제
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3μ°¨ μ„Έλ―Έλ‚˜]
5 participants