From 0c3c2026305d8665691907510009723c4d13fa87 Mon Sep 17 00:00:00 2001 From: b1urrrr Date: Fri, 30 Dec 2022 23:08:28 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[UI/#9]=20Card=20Fragment=20=EB=B0=9C?= =?UTF-8?q?=EA=B8=89=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/drawable/ic_card_keyneez.xml | 30 ++++++ app/src/main/res/drawable/img_card_cards.xml | 102 ++++++++++++++++++ .../res/drawable/shape_white_fill_9_rect.xml | 9 ++ app/src/main/res/layout/fragment_card.xml | 81 ++++++++++++-- app/src/main/res/values/colors.xml | 4 + app/src/main/res/values/strings.xml | 7 +- 6 files changed, 225 insertions(+), 8 deletions(-) create mode 100644 app/src/main/res/drawable/ic_card_keyneez.xml create mode 100644 app/src/main/res/drawable/img_card_cards.xml create mode 100644 app/src/main/res/drawable/shape_white_fill_9_rect.xml diff --git a/app/src/main/res/drawable/ic_card_keyneez.xml b/app/src/main/res/drawable/ic_card_keyneez.xml new file mode 100644 index 0000000..8c72e05 --- /dev/null +++ b/app/src/main/res/drawable/ic_card_keyneez.xml @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_card_cards.xml b/app/src/main/res/drawable/img_card_cards.xml new file mode 100644 index 0000000..9760696 --- /dev/null +++ b/app/src/main/res/drawable/img_card_cards.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/shape_white_fill_9_rect.xml b/app/src/main/res/drawable/shape_white_fill_9_rect.xml new file mode 100644 index 0000000..444f942 --- /dev/null +++ b/app/src/main/res/drawable/shape_white_fill_9_rect.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_card.xml b/app/src/main/res/layout/fragment_card.xml index c6e850d..6a0cd62 100644 --- a/app/src/main/res/layout/fragment_card.xml +++ b/app/src/main/res/layout/fragment_card.xml @@ -1,5 +1,6 @@ @@ -7,15 +8,81 @@ - + android:layout_height="match_parent" + android:background="@color/black_600"> - - + + + android:layout_height="wrap_content" + android:layout_marginTop="13dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/iv_card_keyneez"> + + + + + + + + + - + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index f8c6127..8860d60 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,4 +7,8 @@ #FF018786 #FF000000 #FFFFFFFF + + #FF1E1E1E + #FF262626 + #FFA8A8A8 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f152446..0a04051 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,11 +5,16 @@ Binding not initialized to reference the view. // main - "Home" + Home Like Card Setting + // card + 나의 ID + 온라인 ID로 더 다양한\n활동을 즐겨보세요 + 발급하기 + Hello blank fragment \ No newline at end of file From 33aabc2d39120a5c149d9b7907175d14b9e370e4 Mon Sep 17 00:00:00 2001 From: b1urrrr Date: Sat, 31 Dec 2022 16:08:08 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[ADD/#9]=20keyneez=20colors=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/values/colors.xml | 44 +++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 8860d60..7252ec1 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -5,9 +5,51 @@ #FF3700B3 #FF03DAC5 #FF018786 - #FF000000 #FFFFFFFF + + #00A5CB + #2CC9ED + #69D6EF + #AEEDFC + #CEF6FF + + #D03607 + #FE5C2B + #FF825C + #FFBDA9 + #FFDCD2 + + #90B400 + #CBEC00 + #E0F657 + #F0FF96 + #F9FFCD + + #3A1FAD + #6948F7 + #7F63FA + #C6B9FF + #E6E0FF + + #D23C69 + #FD6D90 + #FE8BAE + #FEC4D6 + #FFE1E9 + + #000000 + #1F1F1F + #333333 + #474747 + #5C5C5C + #ADADAD + #D6D6D6 + #EDEDED + #F7F7F7 + #FFFFFF + + #FF1E1E1E #FF262626 #FFA8A8A8 From 9801d9ef27937359cb3f84c8212c3af076b66bfe Mon Sep 17 00:00:00 2001 From: b1urrrr Date: Sun, 1 Jan 2023 02:42:02 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[UI/#12]=20verification=20=EB=B7=B0=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 9 +- .../presentation/main/card/CardFragment.kt | 12 +++ .../verification/VerificationActivity.kt | 19 ++++- .../lab/keyneez/util/OnSingleClickListener.kt | 21 +++++ .../com/lab/keyneez/util/extension/ViewExt.kt | 11 +++ .../res/drawable/ic_verification_back.xml | 9 ++ .../res/drawable/img_verification_card.xml | 46 ++++++++++ .../res/drawable/shape_black_fill_4_rect.xml | 9 ++ .../main/res/layout/activity_verification.xml | 85 +++++++++++++++++-- app/src/main/res/layout/fragment_card.xml | 3 +- app/src/main/res/values-night/themes.xml | 6 +- app/src/main/res/values/colors.xml | 3 +- app/src/main/res/values/strings.xml | 15 ++-- app/src/main/res/values/themes.xml | 6 +- 14 files changed, 228 insertions(+), 26 deletions(-) create mode 100644 app/src/main/java/com/lab/keyneez/util/OnSingleClickListener.kt create mode 100644 app/src/main/java/com/lab/keyneez/util/extension/ViewExt.kt create mode 100644 app/src/main/res/drawable/ic_verification_back.xml create mode 100644 app/src/main/res/drawable/img_verification_card.xml create mode 100644 app/src/main/res/drawable/shape_black_fill_4_rect.xml diff --git a/app/build.gradle b/app/build.gradle index a1d1a0e..b7fc978 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,7 +16,7 @@ android { defaultConfig { applicationId "com.lab.keyneez" minSdk 25 - targetSdk 32 + targetSdk 33 versionCode 1 versionName "1.0" @@ -81,11 +81,12 @@ dependencies { // kotlin serialization implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha05") + // constraint layout + implementation "androidx.constraintlayout:constraintlayout:2.2.0-alpha05" // glide - implementation 'com.github.bumptech.glide:glide:4.13.0' - annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0' + implementation 'com.github.bumptech.glide:glide:4.14.2' + annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2' implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.5.1' diff --git a/app/src/main/java/com/lab/keyneez/presentation/main/card/CardFragment.kt b/app/src/main/java/com/lab/keyneez/presentation/main/card/CardFragment.kt index c336664..e99ea48 100644 --- a/app/src/main/java/com/lab/keyneez/presentation/main/card/CardFragment.kt +++ b/app/src/main/java/com/lab/keyneez/presentation/main/card/CardFragment.kt @@ -1,14 +1,26 @@ package com.lab.keyneez.presentation.main.card +import android.content.Intent import android.os.Bundle import android.view.View import com.lab.keyneez.R import com.lab.keyneez.databinding.FragmentCardBinding +import com.lab.keyneez.presentation.verification.VerificationActivity import com.lab.keyneez.util.binding.BindingFragment +import com.lab.keyneez.util.extension.setOnSingleClickListener class CardFragment : BindingFragment(R.layout.fragment_card) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + + initIssueBtnClickListener() + } + + private fun initIssueBtnClickListener() { + binding.btnCardIssue.setOnSingleClickListener { + val toVertification = Intent(activity, VerificationActivity::class.java) + startActivity(toVertification) + } } companion object { diff --git a/app/src/main/java/com/lab/keyneez/presentation/verification/VerificationActivity.kt b/app/src/main/java/com/lab/keyneez/presentation/verification/VerificationActivity.kt index 848a29d..511a60a 100644 --- a/app/src/main/java/com/lab/keyneez/presentation/verification/VerificationActivity.kt +++ b/app/src/main/java/com/lab/keyneez/presentation/verification/VerificationActivity.kt @@ -1,14 +1,27 @@ package com.lab.keyneez.presentation.verification import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity import com.lab.keyneez.R +import com.lab.keyneez.databinding.ActivityVerificationBinding +import com.lab.keyneez.util.binding.BindingActivity +import com.lab.keyneez.util.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint -class VerificationActivity : AppCompatActivity() { +class VerificationActivity : + BindingActivity(R.layout.activity_verification) { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.activity_verification) + + initBackBtnClickListener() + initStartCameraBtnClickListener() + } + + private fun initBackBtnClickListener() { + binding.btnVerificationBack.setOnSingleClickListener { finish() } + } + + private fun initStartCameraBtnClickListener() { + // ocr 기능 구현 } } diff --git a/app/src/main/java/com/lab/keyneez/util/OnSingleClickListener.kt b/app/src/main/java/com/lab/keyneez/util/OnSingleClickListener.kt new file mode 100644 index 0000000..3f7efb9 --- /dev/null +++ b/app/src/main/java/com/lab/keyneez/util/OnSingleClickListener.kt @@ -0,0 +1,21 @@ +package com.lab.keyneez.util + +import android.os.SystemClock +import android.view.View + +class OnSingleClickListener( + private var interval: Int = 600, + private var onSingleClick: (View) -> Unit +) : View.OnClickListener { + + private var lastClickTime: Long = 0 + + override fun onClick(v: View) { + val elapsedRealtime = SystemClock.elapsedRealtime() + if ((elapsedRealtime - lastClickTime) < interval) { + return + } + lastClickTime = elapsedRealtime + onSingleClick(v) + } +} diff --git a/app/src/main/java/com/lab/keyneez/util/extension/ViewExt.kt b/app/src/main/java/com/lab/keyneez/util/extension/ViewExt.kt new file mode 100644 index 0000000..08577a6 --- /dev/null +++ b/app/src/main/java/com/lab/keyneez/util/extension/ViewExt.kt @@ -0,0 +1,11 @@ +package com.lab.keyneez.util.extension // ktlint-disable filename + +import android.view.View +import com.lab.keyneez.util.OnSingleClickListener + +fun View.setOnSingleClickListener(onSingleClick: (View) -> Unit) { + val oneClick = OnSingleClickListener { + onSingleClick(it) + } + setOnClickListener(oneClick) +} diff --git a/app/src/main/res/drawable/ic_verification_back.xml b/app/src/main/res/drawable/ic_verification_back.xml new file mode 100644 index 0000000..7069378 --- /dev/null +++ b/app/src/main/res/drawable/ic_verification_back.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/img_verification_card.xml b/app/src/main/res/drawable/img_verification_card.xml new file mode 100644 index 0000000..2258208 --- /dev/null +++ b/app/src/main/res/drawable/img_verification_card.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/shape_black_fill_4_rect.xml b/app/src/main/res/drawable/shape_black_fill_4_rect.xml new file mode 100644 index 0000000..aa65d9e --- /dev/null +++ b/app/src/main/res/drawable/shape_black_fill_4_rect.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_verification.xml b/app/src/main/res/layout/activity_verification.xml index a3a56d1..be17af3 100644 --- a/app/src/main/res/layout/activity_verification.xml +++ b/app/src/main/res/layout/activity_verification.xml @@ -1,15 +1,90 @@ - + - + android:layout_height="match_parent"> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_card.xml b/app/src/main/res/layout/fragment_card.xml index 6a0cd62..49ccf52 100644 --- a/app/src/main/res/layout/fragment_card.xml +++ b/app/src/main/res/layout/fragment_card.xml @@ -28,11 +28,10 @@ android:id="@+id/layout_card_issue" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="13dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/iv_card_keyneez"> + app:layout_constraintTop_toTopOf="parent">