-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
228 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/lab/keyneez/presentation/main/card/CardFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
app/src/main/java/com/lab/keyneez/presentation/verification/VerificationActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<ActivityVerificationBinding>(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 기능 구현 | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/lab/keyneez/util/OnSingleClickListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/lab/keyneez/util/extension/ViewExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
<path | ||
android:pathData="M13.333,29.334L0,16L13.333,2.667L15.2,4.567L3.767,16L15.2,27.434L13.333,29.334Z" | ||
android:fillColor="#000000"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="327dp" | ||
android:height="192dp" | ||
android:viewportWidth="327" | ||
android:viewportHeight="192"> | ||
<path | ||
android:pathData="M12,0L315,0A12,12 0,0 1,327 12L327,180A12,12 0,0 1,315 192L12,192A12,12 0,0 1,0 180L0,12A12,12 0,0 1,12 0z" | ||
android:fillColor="#AEEDFC"/> | ||
<path | ||
android:pathData="M47.99,36L135.99,36A16,16 0,0 1,151.99 52L151.99,140A16,16 0,0 1,135.99 156L47.99,156A16,16 0,0 1,31.99 140L31.99,52A16,16 0,0 1,47.99 36z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M67,86m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0" | ||
android:fillColor="#FFDCD2"/> | ||
<path | ||
android:pathData="M83.5,75L83.5,75A2.5,2.5 0,0 1,86 77.5L86,80.5A2.5,2.5 0,0 1,83.5 83L83.5,83A2.5,2.5 0,0 1,81 80.5L81,77.5A2.5,2.5 0,0 1,83.5 75z" | ||
android:fillColor="#000000"/> | ||
<path | ||
android:pathData="M100.5,75L100.5,75A2.5,2.5 0,0 1,103 77.5L103,80.5A2.5,2.5 0,0 1,100.5 83L100.5,83A2.5,2.5 0,0 1,98 80.5L98,77.5A2.5,2.5 0,0 1,100.5 75z" | ||
android:fillColor="#000000"/> | ||
<path | ||
android:pathData="M100,87C100,88.05 99.79,89.09 99.39,90.06C98.99,91.03 98.4,91.91 97.66,92.66C96.91,93.4 96.03,93.99 95.06,94.39C94.09,94.79 93.05,95 92,95C90.95,95 89.91,94.79 88.94,94.39C87.97,93.99 87.09,93.4 86.34,92.66C85.6,91.91 85.01,91.03 84.61,90.06C84.21,89.09 84,88.05 84,87L92,87H100Z" | ||
android:fillColor="#000000"/> | ||
<path | ||
android:pathData="M117,86m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0" | ||
android:fillColor="#FFDCD2"/> | ||
<path | ||
android:pathData="M92.62,107H101.25C101.8,107 102.25,107.45 102.25,108L102.25,116.77C102.25,117.64 101.23,118.09 100.59,117.52L92,109.89L83.41,117.52C82.77,118.09 81.75,117.64 81.75,116.77V108C81.75,107.45 82.2,107 82.75,107H91.38H92.62Z" | ||
android:fillColor="#000000" | ||
android:fillType="evenOdd"/> | ||
<path | ||
android:pathData="M190.42,51L233.42,51A10.5,10.5 0,0 1,243.92 61.5L243.92,61.5A10.5,10.5 0,0 1,233.42 72L190.42,72A10.5,10.5 0,0 1,179.92 61.5L179.92,61.5A10.5,10.5 0,0 1,190.42 51z" | ||
android:strokeAlpha="0.8" | ||
android:fillColor="#ffffff" | ||
android:fillAlpha="0.8"/> | ||
<path | ||
android:pathData="M190.42,92L283.42,92A10.5,10.5 0,0 1,293.92 102.5L293.92,102.5A10.5,10.5 0,0 1,283.42 113L190.42,113A10.5,10.5 0,0 1,179.92 102.5L179.92,102.5A10.5,10.5 0,0 1,190.42 92z" | ||
android:strokeAlpha="0.8" | ||
android:fillColor="#ffffff" | ||
android:fillAlpha="0.8"/> | ||
<path | ||
android:pathData="M190.42,121L283.42,121A10.5,10.5 0,0 1,293.92 131.5L293.92,131.5A10.5,10.5 0,0 1,283.42 142L190.42,142A10.5,10.5 0,0 1,179.92 131.5L179.92,131.5A10.5,10.5 0,0 1,190.42 121z" | ||
android:strokeAlpha="0.8" | ||
android:fillColor="#ffffff" | ||
android:fillAlpha="0.8"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/gray900" /> | ||
<corners android:radius="4dp" /> | ||
</shape> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,90 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout> | ||
<layout 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" | ||
tools:context=".presentation.verification.VerificationActivity"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/layout_verification" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".presentation.verification.VerificationActivity"> | ||
android:layout_height="match_parent"> | ||
|
||
<ImageButton | ||
android:id="@+id/btn_verification_back" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="12dp" | ||
android:background="@null" | ||
android:padding="12dp" | ||
android:src="@drawable/ic_verification_back" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<ScrollView | ||
android:id="@+id/sv_verification_description" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/btn_verification_back"> | ||
|
||
<LinearLayout | ||
android:id="@+id/layout_verification_description" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:id="@+id/tv_verification_description" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="16dp" | ||
android:text="@string/verification_description" | ||
android:textColor="@color/gray900" | ||
android:textSize="24sp" | ||
android:textStyle="bold" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_verification_sub_description" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textColor="@color/gray500" | ||
android:textSize="18sp" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginHorizontal="24dp" | ||
android:text="@string/verification_sub_description"/> | ||
|
||
<ImageView | ||
android:id="@+id/iv_verification_card" | ||
android:layout_marginTop="72dp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:src="@drawable/img_verification_card" /> | ||
</LinearLayout> | ||
</ScrollView> | ||
|
||
<TextView | ||
android:id="@+id/btn_verification_start_camera" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="16dp" | ||
android:layout_marginBottom="44dp" | ||
android:background="@drawable/shape_black_fill_4_rect" | ||
android:gravity="center" | ||
android:paddingVertical="15dp" | ||
android:text="@string/verification_start_camera" | ||
android:textColor="@color/white" | ||
android:textSize="16sp" | ||
android:textStyle="bold" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters