Skip to content

Commit

Permalink
Merge pull request #297 from team-peekabook/feature/#296-ui-barcode
Browse files Browse the repository at this point in the history
#296 [ui] �책 검색 개선
  • Loading branch information
2zerozu authored Feb 25, 2024
2 parents a84046c + 993dd4d commit 919e673
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class BarcodeScannerFragment :
}

private fun initHardDetectedClickListener() {
binding.llBarcodeHardDetected.setSingleOnClickListener {
binding.btnBarcodeTextSearch.setSingleOnClickListener {
bundle.putString(LOCATION, CREATE)
findNavController().navigate(
R.id.action_barcodeScannerFragment_to_searchBookFragment,
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/res/drawable/ic_barcode_line.xml

This file was deleted.

14 changes: 14 additions & 0 deletions app/src/main/res/drawable/ic_barcode_text_search.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="131dp"
android:height="28dp"
android:viewportWidth="131"
android:viewportHeight="28">
<path
android:pathData="M14,1L117,1A13,13 0,0 1,130 14L130,14A13,13 0,0 1,117 27L14,27A13,13 0,0 1,1 14L1,14A13,13 0,0 1,14 1z"
android:strokeWidth="0.5"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
<path
android:pathData="M19.1,14.33L18.54,15.26C17.54,14.87 16.86,14.18 16.46,13.29C16.09,14.25 15.4,15.03 14.36,15.45L13.78,14.52C15.16,13.98 15.85,12.76 15.85,11.49V11.4H14.03V10.42H15.85V9.2H17.04V10.42H18.82V11.4H17.04V11.49C17.04,12.7 17.75,13.84 19.1,14.33ZM15.56,17.26V16.26H22.91V19.94H21.67V17.26H15.56ZM21.73,9.1H22.91V15.74H21.73V12.92H20.62V15.68H19.45V9.28H20.62V11.91H21.73V9.1ZM30.76,11.28V12.06C30.76,13.91 31.46,15.78 32.97,16.66L32.25,17.56C31.23,16.96 30.56,15.89 30.18,14.63C29.79,16 29.1,17.16 28.05,17.82L27.31,16.91C28.84,15.95 29.56,14 29.56,12.06V11.28H27.66V10.26H32.55V11.28H30.76ZM33.36,12.89V9.29H34.52V19.4H33.36V13.9H31.76V12.89H33.36ZM35.54,9.08H36.72V19.91H35.54V9.08ZM39.61,17.44V16.44H47.11V19.92H45.87V17.44H39.61ZM40.96,10.5V12.29H45.85V10.5H40.96ZM44.02,14.49H48.32V15.48H38.5V14.49H42.77V13.28H39.75V9.52H47.06V13.28H44.02V14.49ZM54.45,9.7C56.71,9.7 58.43,10.92 58.43,12.76C58.43,14.61 56.71,15.82 54.45,15.82C52.18,15.82 50.47,14.61 50.47,12.76C50.47,10.92 52.18,9.7 54.45,9.7ZM54.45,10.72C52.84,10.72 51.67,11.51 51.67,12.76C51.67,14.01 52.84,14.8 54.45,14.8C56.05,14.8 57.23,14.01 57.23,12.76C57.23,11.51 56.05,10.72 54.45,10.72ZM49.55,17.54H59.37V18.56H49.55V17.54ZM66.1,17.63H70.41V18.65H60.59V17.63H64.86V15.78H61.78V12.29H68.02V10.84H61.76V9.84H69.24V13.28H62.99V14.79H69.48V15.78H66.1V17.63ZM74.97,9.74H79.89C79.89,12.54 78.03,14.49 74.9,15.38L74.4,14.39C76.88,13.72 78.35,12.41 78.56,10.74H74.97V9.74ZM77.46,16.65V18.8H82.09V16.65H77.46ZM76.25,19.79V15.66H83.3V19.79H76.25ZM82.07,9.08H83.3V15.22H82.07V12.8H79.92V11.78H82.07V9.08ZM90.79,14.09L90.13,15.03C89.17,14.63 88.5,13.9 88.1,13.02C87.71,14.02 87,14.86 85.97,15.32L85.31,14.37C86.76,13.71 87.49,12.33 87.49,11.09V9.71H88.69V11.09C88.69,12.3 89.39,13.53 90.79,14.09ZM87.19,17.19V16.19H94.53V19.94H93.3V17.19H87.19ZM93.36,9.09H94.53V15.65H93.36V12.83H92.22V15.59H91.05V9.27H92.22V11.82H93.36V9.09ZM99.56,16.58C100.44,16.58 101.07,15.98 101.07,15.06C101.07,14.15 100.44,13.55 99.56,13.55C98.68,13.55 98.05,14.15 98.05,15.06C98.05,15.98 98.68,16.58 99.56,16.58ZM99.56,12.53C101.11,12.53 102.25,13.59 102.25,15.06C102.25,16.55 101.11,17.6 99.56,17.6C98,17.6 96.87,16.55 96.87,15.06C96.87,13.59 98,12.53 99.56,12.53ZM100.16,9.26V10.76H102.69V11.76H96.35V10.76H98.93V9.26H100.16ZM106.49,13.44V14.48H104.82V19.94H103.57V9.09H104.82V13.44H106.49ZM108.06,10.23H113.19C113.19,13.46 111.9,16.19 108.18,17.99L107.52,17.01C110.36,15.64 111.7,13.73 111.92,11.24H108.06V10.23ZM115.15,9.09H116.38V19.92H115.15V9.09Z"
android:fillColor="#ffffff"/>
</vector>
30 changes: 6 additions & 24 deletions app/src/main/res/layout/fragment_barcode_scanner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,15 @@
app:layout_constraintStart_toStartOf="@id/pv_barcode"
app:layout_constraintTop_toTopOf="@id/pv_barcode" />

<LinearLayout
android:id="@+id/ll_barcode_hard_detected"
<ImageButton
android:id="@+id/btn_barcode_text_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="31dp"
android:paddingBottom="18dp"
android:layout_marginBottom="136dp"
android:background="@null"
android:src="@drawable/ic_barcode_text_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<TextView
android:id="@+id/tv_barcode_hard_detected"
style="@style/C2Md"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/barcode_hard_detected"
android:textColor="@color/peeka_white" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:src="@drawable/ic_barcode_line" />

</LinearLayout>
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<!-- Barcode -->
<string name="barcode_permission">휴대폰 앱 설정에서 카메라 권한을 허용해주세요!</string>
<string name="barcode_title">책 검색하기</string>
<string name="barcode_hard_detected">바코드 인식이 어려우신가요?</string>
<string name="barcode_guide">책의 뒷면에 있는 ISBN 바코드가\n사각형 안에 들어오게 해주세요.</string>
<string name="barcode_error">존재하지 않는 책입니다</string>
<string name="barcode_error_search">텍스트로 검색하기</string>
Expand Down

0 comments on commit 919e673

Please sign in to comment.