-
Notifications
You must be signed in to change notification settings - Fork 2
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
[UI/#51] 설정 뷰 / UI 구현 #65
Changes from 19 commits
af92956
f2edfb1
8b31ea6
5469a48
9e67ffa
5cd269b
aaba0be
0a5b3c8
ce5e119
cb6a9ab
23a9adb
aa78d4f
c42edb8
944f526
e678a90
e024a07
83f7707
3f35336
15203e9
0ed5e1c
fdc6d6f
6f540b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package com.going.presentation.setting | ||
|
||
import android.os.Bundle | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.ActivitySettingBinding | ||
import com.going.ui.base.BaseActivity | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
class SettingActivity : BaseActivity<ActivitySettingBinding>(R.layout.activity_setting) { | ||
|
||
private lateinit var quitDialog: SettingQuitDialogFragment | ||
private lateinit var logoutDialog: SettingLogoutDialogFragment | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initProfileClickListener() | ||
initInquireClickListener() | ||
initPolicyClickListener() | ||
initAboutDooripClickListener() | ||
initLogoutClickListener() | ||
initQuitClickListener() | ||
|
||
} | ||
|
||
private fun initProfileClickListener() { | ||
binding.btnSettingProfileEnter.setOnSingleClickListener { | ||
|
||
} | ||
} | ||
|
||
private fun initInquireClickListener() { | ||
binding.btnSettingInquireEnter.setOnSingleClickListener { | ||
|
||
} | ||
} | ||
|
||
private fun initPolicyClickListener() { | ||
binding.btnSettingPolicyEnter.setOnSingleClickListener { | ||
|
||
} | ||
} | ||
|
||
private fun initAboutDooripClickListener() { | ||
binding.btnSettingAboutDooripEnter.setOnSingleClickListener { | ||
|
||
} | ||
} | ||
|
||
private fun initLogoutClickListener() { | ||
binding.btnSettingLogoutEnter.setOnSingleClickListener { | ||
showLogoutAlertDialog() | ||
} | ||
} | ||
|
||
private fun initQuitClickListener() { | ||
binding.btnSettingQuit.setOnSingleClickListener { | ||
showQuitAlertDialog() | ||
} | ||
} | ||
|
||
private fun showLogoutAlertDialog() { | ||
logoutDialog = SettingLogoutDialogFragment() | ||
logoutDialog.show(supportFragmentManager, logoutDialog.tag) | ||
} | ||
|
||
private fun showQuitAlertDialog() { | ||
quitDialog = SettingQuitDialogFragment() | ||
quitDialog.show(supportFragmentManager, quitDialog.tag) | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.going.presentation.setting | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import android.view.WindowManager | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.FragmentSettingLogoutDialogBinding | ||
import com.going.ui.base.BaseDialog | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
class SettingLogoutDialogFragment : | ||
BaseDialog<FragmentSettingLogoutDialogBinding>(R.layout.fragment_setting_logout_dialog) { | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
initNegativeClickListener() | ||
initPositiveClickListener() | ||
|
||
} | ||
|
||
override fun onStart() { | ||
super.onStart() | ||
dialog?.window?.apply { | ||
setLayout( | ||
WindowManager.LayoutParams.MATCH_PARENT, | ||
WindowManager.LayoutParams.MATCH_PARENT, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 요 아이때문에 다이얼로그가 화면 꽉 차게 안나와서 애먹은게 새록새록하네요 ㅎ.ㅎ |
||
) | ||
setBackgroundDrawableResource(R.color.transparent_60) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 뒤에 배경 굿 좋습니다~~ |
||
} | ||
} | ||
|
||
private fun initPositiveClickListener() { | ||
binding.tvDialogPositive.setOnSingleClickListener { | ||
// 로그아웃 버튼 눌렀을 때의 로직 | ||
} | ||
} | ||
|
||
private fun initNegativeClickListener() { | ||
binding.btnDialogNegative.setOnSingleClickListener { | ||
dismiss() | ||
} | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.going.presentation.setting | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import android.view.WindowManager | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.FragmentSettingQuitDialogBinding | ||
import com.going.ui.base.BaseDialog | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
class SettingQuitDialogFragment : | ||
BaseDialog<FragmentSettingQuitDialogBinding>(R.layout.fragment_setting_quit_dialog) { | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
initNegativeClickListener() | ||
initPositiveClickListener() | ||
|
||
} | ||
|
||
override fun onStart() { | ||
super.onStart() | ||
dialog?.window?.apply { | ||
setLayout( | ||
WindowManager.LayoutParams.MATCH_PARENT, | ||
WindowManager.LayoutParams.MATCH_PARENT, | ||
) | ||
setBackgroundDrawableResource(R.color.transparent_60) | ||
} | ||
} | ||
|
||
private fun initPositiveClickListener() { | ||
binding.tvDialogPositive.setOnSingleClickListener { | ||
dismiss() | ||
} | ||
} | ||
|
||
private fun initNegativeClickListener() { | ||
// 탈퇴하기 버튼을 눌렀을 때의 로직 | ||
} | ||
|
||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="25dp" | ||
android:height="25dp" | ||
android:viewportWidth="25" | ||
android:viewportHeight="25"> | ||
<path | ||
android:strokeWidth="1" | ||
android:pathData="M10,18L16,12.5L10,7" | ||
android:strokeLineJoin="round" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#9093A8" | ||
android:strokeLineCap="round"/> | ||
</vector> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="16dp" | ||
android:height="16dp" | ||
android:viewportWidth="16" | ||
android:viewportHeight="16"> | ||
<group> | ||
<clip-path | ||
android:pathData="M0,0h16v16h-16z"/> | ||
<path | ||
android:pathData="M-53.277,18.417L-61.734,9.927L-53.271,1.463L-51.668,-0.14V20.032V25.925L-48.334,29.282V39.138C-43.177,50.552 -34.349,59.953 -23.355,65.834H-12.04L-7.075,70.834H9.999V65.834H15.141V64.167H41.947L46.947,59.167H64.999V64.167H41.947L33.614,72.5H3.332C0.078,72.5 -3.112,72.226 -6.216,71.699L-7.075,70.834H-10.363C-14.939,69.698 -19.295,68.006 -23.355,65.834H-48.334V39.138C-49.721,36.071 -50.841,32.858 -51.668,29.529V25.925L-52.599,24.987C-52.948,22.835 -53.177,20.643 -53.277,18.417Z" | ||
android:fillColor="#9093A8"/> | ||
<path | ||
android:pathData="M10.599,5.101C10.543,5.045 10.453,5.045 10.397,5.101L9.894,5.604C9.838,5.66 9.838,5.75 9.894,5.806L10.84,6.756C10.93,6.846 10.866,7 10.739,7H6.142C6.063,7 5.999,7.064 5.999,7.143V7.857C5.999,7.936 6.063,8 6.142,8H10.738C10.865,8 10.929,8.154 10.839,8.244L9.894,9.189C9.838,9.245 9.838,9.335 9.893,9.391L10.397,9.898C10.453,9.954 10.543,9.955 10.599,9.899L12.896,7.601C12.952,7.545 12.952,7.455 12.896,7.399L10.599,5.101ZM4,4.143C4,4.064 4.064,4 4.143,4H7.856C7.935,4 7.999,3.936 7.999,3.857V3.143C7.999,3.064 7.935,3 7.856,3H4C3.45,3 3,3.45 3,4V11C3,11.55 3.45,12 4,12H7.856C7.935,12 7.999,11.936 7.999,11.857V11.143C7.999,11.064 7.935,11 7.856,11H4.143C4.064,11 4,10.936 4,10.857V4.143Z" | ||
android:fillColor="#9093A8"/> | ||
</group> | ||
</vector> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/white_000" /> | ||
<corners android:radius="2dp" /> | ||
</shape> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네이밍 참고해주세용~~~~~~~ rect_2입니다 우하하 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/white_000" /> | ||
<corners android:radius="6dp" /> | ||
</shape> |
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.
nullable한 dialog로 초기값 null로 설정해서 전역변수를 생성한 뒤, 생성할때만 실제 객체를 연결해주고, onDestroy때 dissmiss() 해준다면 메모리 누수를 더 방지할 수 있습니다~~
제 투두생성 시 바텀시트 올리는 코드 참고해보시면 좋을듯 !