This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create QR Code Scan Screen (EXPOSUREAPP-5742) (#2697)
* the qr code scan screen style is now shared between test and event scan screen as of now layouts are still separate files, may condense later * Removed transitionName from fragment_scan_check_in_qr_code and fragment_submission_qr_code_scan * Readded missing transitionName to fragment_scan_check_in_qr_code * Reverting changes to all translated strings * Re added the old string keys to default file to allow linting to pass (should be overwritten by translation) Co-authored-by: harambasicluka <64483219+harambasicluka@users.noreply.github.com>
- Loading branch information
1 parent
6b98eca
commit d8d2f5f
Showing
10 changed files
with
134 additions
and
165 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
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
164 changes: 69 additions & 95 deletions
164
Corona-Warn-App/src/main/res/layout/fragment_submission_qr_code_scan.xml
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,113 +1,87 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:bind="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
android:id="@+id/submission_qr_code_scan_container" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:contentDescription="@string/qr_code_scan_body"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/submission_qr_code_scan_container" | ||
android:contentDescription="@string/submission_qr_code_scan_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.journeyapps.barcodescanner.BarcodeView | ||
android:id="@+id/submission_qr_code_scan_preview" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:zxing_framing_rect_height="@dimen/submission_scan_qr_code_viewfinder_size" | ||
app:zxing_framing_rect_width="@dimen/submission_scan_qr_code_viewfinder_size"> | ||
|
||
</com.journeyapps.barcodescanner.BarcodeView> | ||
<com.journeyapps.barcodescanner.BarcodeView | ||
android:id="@+id/submission_qr_code_scan_preview" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:zxing_framing_rect_height="@dimen/scan_qr_code_viewfinder_size" | ||
app:zxing_framing_rect_width="@dimen/scan_qr_code_viewfinder_size"> | ||
|
||
<com.journeyapps.barcodescanner.ViewfinderView | ||
android:id="@+id/submission_qr_code_scan_viewfinder_view" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:zxing_viewfinder_laser_visibility="false" /> | ||
</com.journeyapps.barcodescanner.BarcodeView> | ||
|
||
<TextView | ||
android:id="@+id/submission_qr_code_scan_body" | ||
style="@style/registrationQRCodeScanBody" | ||
android:layout_width="@dimen/submission_scan_qr_code_viewfinder_size" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/submission_scan_qr_code_viewfinder_center_offset" | ||
android:text="@string/submission_qr_code_scan_body" | ||
app:layout_constraintEnd_toEndOf="@+id/submission_qr_code_scan_preview" | ||
app:layout_constraintStart_toStartOf="@+id/submission_qr_code_scan_preview" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_qr_code_scan_guideline_center" /> | ||
<com.journeyapps.barcodescanner.ViewfinderView | ||
android:id="@+id/submission_qr_code_scan_viewfinder_view" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:zxing_viewfinder_laser_visibility="false" | ||
app:zxing_viewfinder_mask="@color/colorQrCodeScanMask" /> | ||
|
||
<ProgressBar | ||
android:id="@+id/submission_qr_code_scan_spinner" | ||
style="?android:attr/progressBarStyle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
android:visibility="gone" | ||
app:layout_constraintEnd_toEndOf="@+id/submission_qr_code_scan_body" | ||
app:layout_constraintStart_toStartOf="@+id/submission_qr_code_scan_body" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_qr_code_scan_body" /> | ||
<TextView | ||
android:id="@+id/submission_qr_code_scan_body" | ||
style="@style/qrCodeScanBody" | ||
android:layout_width="@dimen/scan_qr_code_viewfinder_size" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/scan_qr_code_viewfinder_center_offset" | ||
android:text="@string/qr_code_scan_body" | ||
app:layout_constraintEnd_toEndOf="@id/submission_qr_code_scan_preview" | ||
app:layout_constraintStart_toStartOf="@id/submission_qr_code_scan_preview" | ||
app:layout_constraintTop_toBottomOf="@id/submission_qr_code_scan_guideline_center" /> | ||
|
||
<ProgressBar | ||
android:id="@+id/submission_qr_code_scan_spinner" | ||
style="?android:attr/progressBarStyle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
android:visibility="gone" | ||
app:layout_constraintEnd_toEndOf="@+id/submission_qr_code_scan_body" | ||
app:layout_constraintStart_toStartOf="@+id/submission_qr_code_scan_body" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_qr_code_scan_body" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/submission_qr_code_scan_close" | ||
style="@style/buttonIcon" | ||
android:layout_width="@dimen/icon_size_button" | ||
android:layout_height="@dimen/icon_size_button" | ||
app:layout_constraintBottom_toTopOf="@+id/submission_qr_code_scan_guideline_top" | ||
app:layout_constraintEnd_toStartOf="@+id/guideline_start" | ||
app:layout_constraintStart_toStartOf="@+id/guideline_start" | ||
app:layout_constraintTop_toTopOf="@+id/submission_qr_code_scan_guideline_top"> | ||
|
||
<ImageView | ||
style="@style/iconStable" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
bind:cwaContentDescription="@{@string/accessibility_close}" | ||
android:src="@drawable/ic_close" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:ignore="ContentDescription" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
<com.google.android.material.appbar.MaterialToolbar | ||
android:id="@+id/submission_qr_code_scan_toolbar" | ||
style="@style/CWAToolbar.BackArrow.Transparent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:navigationIconTint="@color/colorQrCodeScanToolbar" | ||
app:title="@string/qr_code_scan_title" | ||
app:titleTextColor="@color/colorQrCodeScanToolbar"> | ||
|
||
<ToggleButton | ||
android:id="@+id/submission_qr_code_scan_torch" | ||
android:layout_width="@dimen/icon_size_button" | ||
android:layout_height="@dimen/icon_size_button" | ||
android:layout_gravity="end" | ||
android:layout_marginEnd="@dimen/spacing_tiny" | ||
android:background="@drawable/ic_registration_qr_code_scan_torch_toggle" | ||
android:backgroundTint="@color/colorStableLight" | ||
android:backgroundTint="@color/colorQrCodeScanToolbar" | ||
android:textOff="" | ||
android:textOn="" | ||
app:layout_constraintBottom_toTopOf="@+id/submission_qr_code_scan_guideline_top" | ||
app:layout_constraintEnd_toStartOf="@+id/guideline_end" | ||
app:layout_constraintStart_toStartOf="@+id/guideline_end" | ||
app:layout_constraintTop_toTopOf="@+id/submission_qr_code_scan_guideline_top" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/submission_qr_code_scan_guideline_top" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
app:layout_constraintGuide_begin="@dimen/spacing_normal" /> | ||
android:textOn="" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/submission_qr_code_scan_guideline_center" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
app:layout_constraintGuide_percent="0.5" /> | ||
</com.google.android.material.appbar.MaterialToolbar> | ||
|
||
<include layout="@layout/merge_guidelines_side" /> | ||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/submission_qr_code_scan_guideline_center" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
app:layout_constraintGuide_percent="0.5" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
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
Oops, something went wrong.