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

[UI/#51] 설정 뷰 / UI 구현 #65

Merged
merged 22 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
af92956
[MOD/#44] tools 수정
leeeyubin Jan 9, 2024
f2edfb1
[ADD/#51] 설정 파일 추가
leeeyubin Jan 9, 2024
8b31ea6
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin Jan 9, 2024
5469a48
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin Jan 9, 2024
9e67ffa
[UI/#51] 설정 UI
leeeyubin Jan 9, 2024
5cd269b
[FEAT/#51] 버튼 클릭 리스너 구현
leeeyubin Jan 9, 2024
aaba0be
[UI/#51] 커스텀 UI
leeeyubin Jan 9, 2024
0a5b3c8
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin Jan 9, 2024
ce5e119
[FEAT/#51] 커스텀 다이얼로그 구현
leeeyubin Jan 9, 2024
cb6a9ab
[FEAT/#51] 상태바 투명도 구현
leeeyubin Jan 9, 2024
23a9adb
[FEAT/#51] 상태바 투명도 구현
leeeyubin Jan 9, 2024
aa78d4f
[FEAT/#51] 시간차 구현
leeeyubin Jan 9, 2024
c42edb8
[MOD/#51] 코드 수정
leeeyubin Jan 9, 2024
944f526
[MOD/#51] 코드 수정
leeeyubin Jan 9, 2024
e678a90
[MOD/#51] 코드 수정
leeeyubin Jan 10, 2024
e024a07
[MOD/#51] 상태바 수정
leeeyubin Jan 10, 2024
83f7707
[FEAT/#51] 로그아웃 커스텀 다이얼로그 구현
leeeyubin Jan 10, 2024
3f35336
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin Jan 10, 2024
15203e9
[FIX/#51] 함수 네이밍 수정
leeeyubin Jan 10, 2024
0ed5e1c
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin Jan 10, 2024
fdc6d6f
[FIX/#51] 배경 투명도 수정
leeeyubin Jan 10, 2024
6f540b9
[FIX/#51] 코드리뷰 반영
leeeyubin Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<!-- Redirect URI: "kakao${NATIVE_APP_KEY}://oauth" -->
<data android:host="oauth"
<data
android:host="oauth"
android:scheme="kakao${NATIVE_APP_KEY}" />
</intent-filter>
</activity>
Expand Down Expand Up @@ -90,7 +92,7 @@
<activity
android:name="com.going.presentation.starttrip.createtrip.CreateTripActivity"
android:exported="false"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />

<activity
android:name="com.going.presentation.starttrip.StartTripSplashActivity"
Expand Down Expand Up @@ -120,7 +122,12 @@
<activity
android:name="com.going.presentation.starttrip.finishtrip.FinishTripActivity"
android:exported="false"
android:screenOrientation="portrait"/>
android:screenOrientation="portrait" />

<activity
android:name="com.going.presentation.setting.SettingActivity"
android:exported="false"
android:screenOrientation="portrait" />

<activity
android:name="com.going.presentation.profile.ProfileActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class PreferenceTagActivity :

}


private fun initAdapter() {
_adapter = PreferenceTagAdapter(this, this)
binding.rvPreferenceTag.adapter = adapter
Expand Down
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
Copy link
Member

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() 해준다면 메모리 누수를 더 방지할 수 있습니다~~
제 투두생성 시 바텀시트 올리는 코드 참고해보시면 좋을듯 !


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,
Copy link
Contributor

Choose a reason for hiding this comment

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

요 아이때문에 다이얼로그가 화면 꽉 차게 안나와서 애먹은게 새록새록하네요 ㅎ.ㅎ

)
setBackgroundDrawableResource(R.color.transparent_60)
Copy link
Contributor

Choose a reason for hiding this comment

The 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() {
// 탈퇴하기 버튼을 눌렀을 때의 로직
}

}


13 changes: 13 additions & 0 deletions presentation/src/main/res/drawable/ic_enter_large.xml
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>
16 changes: 16 additions & 0 deletions presentation/src/main/res/drawable/ic_unsubscribe.xml
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>
Copy link
Member

Choose a reason for hiding this comment

The 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>
4 changes: 2 additions & 2 deletions presentation/src/main/res/layout/activity_preference_tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
tools:context=".preferencetag.PreferenceTagActivity">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_preference_tag"
android:id="@+id/toolbar_preference_tag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/layer_list_preference_tag_gray200_line"
Expand Down Expand Up @@ -56,7 +56,7 @@
app:layout_constraintBottom_toTopOf="@id/btn_preference_start"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/layout_preference_tag"
app:layout_constraintTop_toBottomOf="@id/toolbar_preference_tag"
tools:listitem="@layout/item_preference_tag" />

<ImageView
Expand Down
Loading