-
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
Feat1/week3 #7
base: develop
Are you sure you want to change the base?
Feat1/week3 #7
Conversation
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.
κ³ μνμ ¨μ΅λλ€!! μμ μ½λ μμ§μλ€μ
class HomeActivity : AppCompatActivity() { | ||
private lateinit var binding: ActivityHomeBinding | ||
private var openFAB = false | ||
private val WRITE_EXTERNAL_STORAGE_REQUEST_CODE = 1 |
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.
μ΄κ²λ companion objectμ λ£μΌλ©΄ λ μ’μ κ² κ°μ΅λλ€!
private val View_Myprofile = 0 | ||
private val View_Friend = 1 |
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.
μκ²λ companoin objectλ‘!
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.
FABμ μ΄μ μ€ν¬λ¦° μΊ‘μ³κΉμ§,, λ©μλ μ½λλ€ μ λ³΄κ³ κ°λλ€! λ무 μν΄μ ^0^
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
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.
λ©μλ€... 0-0
class DoAndroidFragment : Fragment() { | ||
private var _binding : FragmentDoAndroidBinding ? = null | ||
private val binding: FragmentDoAndroidBinding | ||
get() = requireNotNull(_binding){"λ°μΈλ© μλ¬"} |
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.
μκΈ°λ stringμΌλ‘ λΊ΄μ£Όμλ©΄ μ’μ κ² κ°μμ~ getString(R.string.xxx)μΌλ‘ μ¬μ©νμ€ μ μμ΅λλ€!
return if (user_id != null && user_major != null) { | ||
MyPageFragment.newInstance(user_id, user_major) | ||
} else { | ||
throw IllegalArgumentException("λ°μ΄ν°κ° μμ΄μ!") |
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.
λ§μ°¬κ°μ§μ λλ€!
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isUserExist μλ°μμΌλ‘ λ°λ‘ 쑰건λ³μλ₯Ό 빼보λ 건 μ΄λ€κ°μ?
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.
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() |
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.
string,,κ·μ ,,λ±μ₯
val MainAdapter = MainAdapter(requireContext()) | ||
binding.rvFriends.adapter = MainAdapter | ||
MainAdapter.profileList = viewModel.mockUserProfileLists |
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.
ν¨μλ‘ λ°λ‘ λΉΌμ£Όμ λ μ’μ λ― ν©λλ€!
UserProfile.User( | ||
profileImage = R.drawable.myimage, | ||
name = "λ°κ°ν¬", | ||
message = "μ€λ μμΌν°λΉ!" |
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.
κ³ λ§ν°λΉ!
majorTextView.text = "$inputTextMajor" | ||
nameTextView.text = "$inputTextName" |
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.
inputTextId μμ²΄κ° stringμ΄ μλκ°μ?
val binding = ItemFriendBinding.inflate(LayoutInflater.from(parent.context), parent, false) | ||
FriendViewHolder(binding) | ||
} | ||
else -> throw IllegalArgumentException("μ ν¨νμ§ μμ") |
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.
νΌμνμ,,,
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.
κ³ μνμ¨λλ€
Glide.with(ivProfile) | ||
.load(userUserProfileData.profileImage) | ||
.into(ivProfile) |
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.
μ€ coilμ΄λ μ΄λ―Έμ§λ‘λλ 곡λΆν΄λ³΄λ©΄ μ’μλ§! μνΈ κΏνμ κΈμμ!
return if (user_id != null && user_major != null) { | ||
MyPageFragment.newInstance(user_id, user_major) | ||
} else { | ||
throw IllegalArgumentException("λ°μ΄ν°κ° μμ΄μ!") |
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.
μ€.. μλ¬λ₯Ό λμ§κ΅°μ
loginIntent.putExtra("entered_id", enteredId) | ||
loginIntent.putExtra("entered_password", enteredPassword) | ||
loginIntent.putExtra("entered_Major", enteredMajor) | ||
loginIntent.putExtra("entered_Name", enteredName) |
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.
νλλ‘ λ§λ€κ³ μΆμ§μλμ?
with(binding) { | ||
Glide.with(ivProfile) | ||
.load(userUserProfileData.profileImage) | ||
.into(ivProfile) |
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.
Glideκ° λ¬΄μ¨ κΈ°λ₯μ νλ ν΄λμ€ μΈκ°μ??
return if (user_id != null && user_major != null) { | ||
MyPageFragment.newInstance(user_id, user_major) | ||
} else { | ||
throw IllegalArgumentException("λ°μ΄ν°κ° μμ΄μ!") |
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.
error handlingκΉμ§ μΆκ°ν κ±° μ’λ€μ!! λ°°μκ°λλ€...λμ°¨λμ°¨
} | ||
binding.fabCapture.setOnClickListener { | ||
takeScreenshot() | ||
} |
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.
ν¨μ μͺΌκ° κ±° 보기 νΈνκ³ μ’λ€μ!
Glide.with(ivProfile) | ||
.load(userUserProfileData.profileImage) | ||
.into(ivProfile) |
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.
κΈλΌμ΄λ..μμΉκ΅¬ 곡λΆν΄μΌκ² μ΄μ... λ°°μκ°λλ€!
πππ΄π΄πΆπ¦π΄
πππ°π³π¬ ππ¦π΄π€π³πͺπ±π΅πͺπ°π―
π·ππ€π³π¦π¦π―π΄π©π°π΅
KakaoTalk_20231110_155335782.mp4
π¬ππ° ππ¦π·πͺπ¦πΈπ¦π³π΄
μΉ΄λ©λΌ λ²νΌ λλ₯΄λ©΄ μ 체νλ©΄ μΊ‘μ³λκ² κ΅¬ννκ³ μΆμλλ° μκΎΈλ§ μ μ₯λ μ¬μ§μ΄ 0 BλΌκ³ λ¨λ€μ₯.. μ΄λ»κ² κ³ μ³μΌ ν μ§ λ μκ°ν΄λ³΄κ² μ΄λ€
μ½λ¦¬ λ¬μμ£Όμλ©΄ μμ ν κ²μ!