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/week4 #10

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

Feat1/week4 #10

wants to merge 25 commits into from

Conversation

crownjoe
Copy link
Contributor

@crownjoe crownjoe commented Nov 17, 2023

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

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

  • νšŒμ›κ°€μž…, 둜그인
  • openAPI μ—°κ²°

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

week_pr4.mp4

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

κ½€λ‚˜ μ–΄λ €μ› μ§€λ§Œ 점점 μ΄ν•΄ν•˜λŠ” 게 λŠ˜μ–΄λ‚˜λŠ” 것 κ°™μ•„μš”!
도와주신 λΆ„λ“€ κ°μ‚¬ν•©λ‹ˆλ‹€
코리 λ‹¬μ•„μ£Όμ‹œλ©΄ 더 κ°μ‚¬ν•©λ‹ˆλ‹€!!

@crownjoe crownjoe added the πŸ“• ν•„μˆ˜ ν•„μˆ˜ 과제 label Nov 17, 2023
@crownjoe crownjoe requested a review from haeti-dev November 17, 2023 08:37
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 13 to 15
Glide.with(ivProfile)
.load(userUserProfileData.profileImage)
.load(userRealUserProfileData.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 λΌμ΄λΈŒλŸ¬λ¦¬λ„ μžˆμŠ΅γ…ˆλ‹ˆλ‹€

Comment on lines +29 to +34
inline fun <reified T> create(baseUrl: String): T {
val retrofit = Retrofit.Builder()
.baseUrl(baseUrl)
.client(okHttpClient)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
Copy link

Choose a reason for hiding this comment

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

urlν™œμš© 쒋은거 κ°™μ•„μš”!

response: Response<ResponseLoginDto>,
) {
if (response.isSuccessful) {
val data: ResponseLoginDto = response.body()!!
Copy link

Choose a reason for hiding this comment

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

!! λΉΌκ³  μ‚¬μš©ν•΄λ΄λ„ 쒋을듯 그리고 λ¦¬μŠ€ν°μŠ€λŠ” 항상 μ„±κ³΅λ§Œν•˜λ‚˜μš”!?? ꢁ금

adapter?.setUserList(it.data)
}
} else {
Toast.makeText(requireContext(), "μ„œλ²„ μ—λŸ¬ λ°œμƒ", Toast.LENGTH_SHORT).show()
Copy link

Choose a reason for hiding this comment

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

μš”λΆ€λΆ„λ„ μœ ν‹Έλ‘œ λΊ„μˆ˜ μžˆμ„κ±° κ°™μ•„μš”

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.

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€ ;-)

tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="false">
</activity>
<activity android:name=".LoginActivity" android:exported="true">
<activity android:name=".login.LoginActivity" android:exported="true">

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

Choose a reason for hiding this comment

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

Companion object둜 빼도 쒋을 것 κ°™μŠ΅λ‹ˆλ‹€!

eventFAB()
}
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 +38 to +49












Choose a reason for hiding this comment

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

곡백 μ‚­μ œν•΄μ£Όμ„Έμš”!

Comment on lines +8 to +9
@GET("api/users?page=2")
fun getUserList(): Call<ResponseUserDto>

Choose a reason for hiding this comment

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

?κ°€ μžˆλŠ” κ²½μš°μ— μ“°λŠ” μ–΄λ…Έν…Œμ΄μ…˜μ΄ λ”°λ‘œ μžˆμŠ΅λ‹ˆλ‹€! μ§€κΈˆμ€ 2번 νŽ˜μ΄μ§€μ— κ΄€ν•œ κ³ μ • 값을 보내주고 μžˆλ„€μš”

Comment on lines +40 to +43
enteredId = data?.getStringExtra("entered_id") ?: ""
enteredPassword = data?.getStringExtra("entered_password") ?: ""
enteredMajor = data?.getStringExtra("entered_Major") ?: ""
enteredName = data?.getStringExtra("entered_Name") ?: ""

Choose a reason for hiding this comment

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

ν•œ λ²ˆμ— μ²˜λ¦¬ν•  수 μžˆλŠ” 멋진 방법이 μžˆμ„ 것 κ°™μŠ΅λ‹ˆλ‹€! μ „λΆ€ data?.gerString() ?: "" μ΄λ„€μš”

@@ -21,12 +21,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:text="μ‘°μ„Έμ—°"

Choose a reason for hiding this comment

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

슀트~γ„Ή

@@ -5,18 +5,18 @@
<item
android:id="@+id/menu_do_android"
android:icon="@drawable/ic_do_android_pink_24"
android:title="DO ANDROID" />
android:title="DO ANDROID"/>

Choose a reason for hiding this comment

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

혼자만 띄어쓰기가 μ‚­μ œλλ„€μš”!

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.

λˆˆλ¬Όλ‚˜κ²Œ μž˜ν•˜μ‹œλ„€μš”! μ½”λ“œ 잘 λ΄€μŠ΅λ‹ˆλ‹€ :)

Comment on lines +64 to +72
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
Copy link
Member

Choose a reason for hiding this comment

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

tryμ—μ„œ μ—λŸ¬κ°€ λ‚˜μ„œ catch λ‚΄λΆ€ λ¬Έμž₯이 μ‹€ν–‰λ˜λ”λΌλ„ ν•˜λ‹¨μ— true둜 μΈν•΄μ„œ 메뉴가 클릭된 μ΄νŽ™νŠΈκ°€ μžˆμ„κ±°μ—μš”!
runCatching을 ν™œμš©ν•΄μ„œ onSuccess일 λ•Œλ§Œ trueλ₯Ό ν•΄μ€€λ‹€λ©΄ 더 쒋을 것 κ°™λ„€μš”!

Comment on lines +101 to +107
if (openFAB) {
ObjectAnimator.ofFloat(binding.fabShare, "translationY", 0f).apply { start() }
ObjectAnimator.ofFloat(binding.fabCapture, "translationY", 0f).apply { start() }
} else {
ObjectAnimator.ofFloat(binding.fabShare, "translationY", -400f).apply { start() }
ObjectAnimator.ofFloat(binding.fabCapture, "translationY", -200f).apply { start() }
}
Copy link
Member

Choose a reason for hiding this comment

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

λŒ€λΆ€λΆ„μ˜ λ¬Έμž₯이 λ°˜λ³΅λ˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€! λ°”λ€ŒλŠ” λΆ€λΆ„λ§Œ λ³€μˆ˜μ²˜λ¦¬ν•΄λ„ 쒋을 것 κ°™λ„€μš©

Suggested change
if (openFAB) {
ObjectAnimator.ofFloat(binding.fabShare, "translationY", 0f).apply { start() }
ObjectAnimator.ofFloat(binding.fabCapture, "translationY", 0f).apply { start() }
} else {
ObjectAnimator.ofFloat(binding.fabShare, "translationY", -400f).apply { start() }
ObjectAnimator.ofFloat(binding.fabCapture, "translationY", -200f).apply { start() }
}
var fir = 0f // 무슨 κΈ°λŠ₯인지 잘 λͺ°λΌμ„œ λ³€μˆ˜λͺ…은 λŒ€μΆ©μ§€μ—ˆμŠ΅λ‹ˆλ‹€!
var sec = 0f
if (openFAB) {
fir = -400f
sec = -200f
}
ObjectAnimator.ofFloat(binding.fabShare, "translationY", fir).apply { start() }
ObjectAnimator.ofFloat(binding.fabCapture, "translationY", sec).apply { start() }

) : UserProfile()
) : RealUserProfile()

Choose a reason for hiding this comment

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

sealed classμ“°μ…¨κ΅°μš” λ°°μ›Œκ°‘λ‹ˆλ‹€!

Copy link

@jihyun0v0 jihyun0v0 left a comment

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.

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