Skip to content

Commit

Permalink
[Design/#35] 질문 답변하기 버튼 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
ss99x2002 committed Jul 10, 2023
1 parent 51f2398 commit 5bb8d82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
package com.sopt.umbba_android.presentation.home

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
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<FragmentHomeBinding>(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")
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".presentation.list.ListFragment">
tools:context=".presentation.list.ListFragment"
android:background="@color/umbba_white">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_image"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
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">
android:layout_height="match_parent"
android:background="@color/umbba_white">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_title_bar"
Expand Down

0 comments on commit 5bb8d82

Please sign in to comment.