Skip to content

Commit

Permalink
[Feat/#35] 설정 화면 클릭이벤트 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
ss99x2002 committed Jul 10, 2023
1 parent a68fd2d commit 32d15b2
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
package com.sopt.umbba_android.presentation.setting

import android.content.Intent
import android.os.Bundle
import com.sopt.umbba_android.R
import com.sopt.umbba_android.databinding.ActivityManageAccountBinding
import com.sopt.umbba_android.util.binding.BindingActivity

class ManageAccountActivity: BindingActivity<ActivityManageAccountBinding>(R.layout.activity_manage_account) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setClickEvent()
}

private fun setClickEvent(){
with(binding){
clLogout.setOnClickListener {
TODO("서버 로그아웃 API 연결")
}
clDeleteAccount.setOnClickListener {
startActivity(Intent(this@ManageAccountActivity,DeleteAccountActivity::class.java))
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.sopt.umbba_android.presentation.setting

import android.content.Intent
import android.os.Bundle
import android.view.View
import com.sopt.umbba_android.R
Expand All @@ -9,5 +10,23 @@ import com.sopt.umbba_android.util.binding.BindingFragment
class SettingFragment:BindingFragment<FragmentSettingBinding>(R.layout.fragment_setting) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setClickEvent()
}
private fun setClickEvent(){
with(binding){
clManageAccount.setOnClickListener {
startActivity(Intent(requireActivity(),ManageAccountActivity::class.java))
}
clAboutUmbba.setOnClickListener{
TODO("엄빠소개 노션으로 이동하도록 만들기. Uri 연결하기")
}
clTos.setOnClickListener {
TODO("이용약관 노션으로 이동하도록 만들기. Uri 연결하기")
}
clNotice.setOnClickListener {
TODO("개인정보처리방침 노션으로 이동하도록 만들기. Uri 연결하기")
}
}
}

}
53 changes: 27 additions & 26 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<layout>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".presentation.MainActivity">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/bnv_main"/>
android:layout_height="match_parent"
tools:context=".presentation.MainActivity">

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:itemIconSize="16dp"
app:itemIconTint="@color/sel_bottom_nav_icon"
app:menu="@menu/menu_bottom"
app:itemBackground="@drawable/sel_bottom_nav_indicator"
app:itemActiveIndicatorStyle="@null"
android:background="@color/umbba_white"
app:itemTextColor="@color/sel_bottom_nav_text"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/bnv_main"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/umbba_white"
app:itemActiveIndicatorStyle="@null"
app:itemBackground="@drawable/sel_bottom_nav_indicator"
app:itemIconSize="16dp"
app:itemIconTint="@color/sel_bottom_nav_icon"
app:itemTextColor="@color/sel_bottom_nav_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/menu_bottom" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_manage_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
android:id="@+id/cl_logout"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/sel_background_bottom_stroke"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/sel_background_bottom_stroke"
app:layout_constraintTop_toBottomOf="@id/layout_appbar">

<TextView
Expand All @@ -33,8 +33,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="26dp"
android:textColor="@color/umbba_black"
android:text="@string/logout"
android:textColor="@color/umbba_black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -56,8 +56,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="26dp"
android:textColor="@color/umbba_black"
android:text="@string/delete_account"
android:textColor="@color/umbba_black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="8dp"
android:checked="false"
android:paddingHorizontal="10dp"
android:thumb="@drawable/shape_switch_thumb"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:showText="true"
android:checked="false"
app:switchMinWidth="17dp"
app:switchTextAppearance="@style/AndroidCaptionRegular10"
app:trackTint="@color/sel_switch_track" />
Expand Down

0 comments on commit 32d15b2

Please sign in to comment.