diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt index d4c11015..8478cce6 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt @@ -1,5 +1,6 @@ package com.sopt.umbba_android.presentation.home +import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -7,14 +8,23 @@ import android.view.ViewGroup import coil.load import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.FragmentHomeBinding +import com.sopt.umbba_android.presentation.qna.QuestionAnswerActivity import com.sopt.umbba_android.util.binding.BindingFragment class HomeFragment : BindingFragment(R.layout.fragment_home) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) setBackground() + setClickEvent() } + private fun setClickEvent(){ + with(binding){ + btnAnswer.setOnClickListener { + startActivity(Intent(requireActivity(), QuestionAnswerActivity::class.java)) + } + } + } private fun setBackground(){ with(binding){ ivBackground.load("https://i.ibb.co/sRV9Vr4/iv-maru.jpg") diff --git a/app/src/main/res/layout/fragment_list.xml b/app/src/main/res/layout/fragment_list.xml index 598a72eb..6094e534 100644 --- a/app/src/main/res/layout/fragment_list.xml +++ b/app/src/main/res/layout/fragment_list.xml @@ -10,7 +10,8 @@ + tools:context=".presentation.list.ListFragment" + android:background="@color/umbba_white"> + android:layout_height="match_parent" + android:background="@color/umbba_white">