From 51f239857065c5e87a64f36d9cceb303242bdbcb Mon Sep 17 00:00:00 2001 From: ss99x2002 Date: Mon, 10 Jul 2023 22:49:48 +0900 Subject: [PATCH] =?UTF-8?q?[Design/#35]=20custom=20appbar=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EB=A6=AC=EC=8A=A4=EB=84=88=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/qna/AnswerActivity.kt | 15 ++++++++++++++- .../presentation/qna/QuestionAnswerActivity.kt | 9 ++++++++- app/src/main/res/layout/qna_appbar.xml | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt index 0430f47f..d6d06e3b 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt @@ -1,8 +1,21 @@ package com.sopt.umbba_android.presentation.qna +import android.os.Bundle +import android.view.View import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.ActivityAnswerBinding import com.sopt.umbba_android.util.binding.BindingActivity -class AnswerActivity: BindingActivity(R.layout.activity_answer) { +class AnswerActivity: BindingActivity(R.layout.activity_answer), View.OnClickListener { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + binding.clickListener=this + } + override fun onClick(view: View?) { + when(view?.id){ + R.id.iv_qna_back->TODO("진짜 뒤로갈거냐는 Dialog 띄우기 ") + R.id.iv_check-> TODO("답변 이거 맞냐고 확인하는 Dialog 띄우기") + } + } + } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt index 9d8c63a9..b9522694 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt @@ -9,9 +9,10 @@ import com.sopt.umbba_android.util.binding.BindingActivity class QuestionAnswerActivity : - BindingActivity(R.layout.activity_question_answer) { + BindingActivity(R.layout.activity_question_answer),View.OnClickListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + binding.clickListener=this setBlurText(true) with(binding) { btnAnswer.setOnClickListener { @@ -20,6 +21,12 @@ class QuestionAnswerActivity : } } + override fun onClick(view: View?) { + when(view?.id){ + R.id.iv_qna_back->finish() + } + } + private fun setBlurText(isBlur: Boolean) { with(binding) { tvAnswerOther.setLayerType(View.LAYER_TYPE_SOFTWARE, null).apply { diff --git a/app/src/main/res/layout/qna_appbar.xml b/app/src/main/res/layout/qna_appbar.xml index 9018a117..d47b90ce 100644 --- a/app/src/main/res/layout/qna_appbar.xml +++ b/app/src/main/res/layout/qna_appbar.xml @@ -35,7 +35,7 @@ android:background="@color/umbba_white">