Skip to content

Commit

Permalink
UI update
Browse files Browse the repository at this point in the history
- add new icons, resources;
- update text styles and colors;
  • Loading branch information
MykhailoNester authored May 11, 2021
1 parent 78c8ec5 commit 743a0e8
Show file tree
Hide file tree
Showing 35 changed files with 36 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ class CodeReaderFragment : Fragment(), NavController.OnDestinationChangedListene
requestCameraPermission()

val formats: Collection<BarcodeFormat> = listOf(BarcodeFormat.AZTEC, BarcodeFormat.QR_CODE)
binding.barcodeScanner.barcodeView.decoderFactory = DefaultDecoderFactory(formats)
binding.barcodeScanner.initializeFromIntent(requireActivity().intent)
binding.barcodeScanner.decoderFactory = DefaultDecoderFactory(formats)
binding.barcodeScanner.decodeContinuous(callback)
beepManager = BeepManager(requireActivity())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ class VerificationDialogFragment : BottomSheetDialogFragment() {

if (isValid) {
text = getString(R.string.cert_valid)
imageId = R.drawable.ic_check
imageId = R.drawable.check
statusColor = ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.green))
actionBtnText = getString(R.string.done)
} else {
text = getString(R.string.cert_invalid)
imageId = R.drawable.ic_baseline_close_24
imageId = R.drawable.error
statusColor = ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.red))
actionBtnText = getString(R.string.retry)
}
Expand Down
Binary file added app/src/main/res/drawable-hdpi/camera_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/eu_logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/camera_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/eu_logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/camera_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/eu_logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/camera_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/eu_logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/eu_logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/eu_logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions app/src/main/res/drawable/ic_baseline_close_24.xml

This file was deleted.

31 changes: 0 additions & 31 deletions app/src/main/res/drawable/ic_check.xml

This file was deleted.

202 changes: 0 additions & 202 deletions app/src/main/res/drawable/ic_logo_eu.xml

This file was deleted.

10 changes: 5 additions & 5 deletions app/src/main/res/drawable/splash_bg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
android:top="150dp" />

<item
android:height="150dp"
android:height="84dp"
android:drawable="@color/white"
android:gravity="bottom" />

<item
android:width="210dp"
android:height="60dp"
android:bottom="50dp"
android:drawable="@drawable/ic_logo_eu"
android:width="60dp"
android:height="36dp"
android:bottom="32dp"
android:drawable="@drawable/eu_logo_big"
android:gravity="bottom|center" />
</layer-list>
14 changes: 8 additions & 6 deletions app/src/main/res/layout/dialog_fragment_verification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:layout_marginHorizontal="@dimen/default_margin"
android:layout_marginTop="30dp"
android:textColor="@color/white"
android:textSize="32sp"
android:textSize="26sp"
android:typeface="normal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -61,14 +61,15 @@
android:scaleType="centerInside"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/person_full_name"
tools:src="@drawable/ic_check" />
tools:src="@drawable/check" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:textColor="@color/white"
android:textSize="24sp"
android:textSize="42sp"
app:layout_constraintBottom_toBottomOf="@+id/cert_status_icon"
app:layout_constraintEnd_toStartOf="@+id/cert_status_icon"
app:layout_constraintTop_toTopOf="@+id/cert_status_icon"
Expand Down Expand Up @@ -206,17 +207,18 @@
android:layout_marginBottom="10dp"
android:backgroundTint="@color/green"
android:letterSpacing="-0.02"
android:minWidth="176dp"
android:text="@string/done"
android:textAllCaps="false"
android:textColor="@color/white"
android:visibility="gone" />
android:visibility="visible" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/logo"
android:layout_width="150dp"
android:layout_width="match_parent"
android:layout_height="40dp"
android:scaleType="centerInside"
android:src="@drawable/ic_logo_eu" />
android:src="@drawable/eu_logo_big" />
</LinearLayout>

<LinearLayout
Expand Down
15 changes: 14 additions & 1 deletion app/src/main/res/layout/fragment_code_reader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.journeyapps.barcodescanner.DecoratedBarcodeView
<com.journeyapps.barcodescanner.BarcodeView
android:id="@+id/barcode_scanner"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand All @@ -35,4 +35,17 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0" />

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="fitXY"
android:src="@drawable/camera_square"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.45"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent="0.85" />


</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<color name="blue">#004494</color>
<color name="blue_dark">#003D84</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="black">#404040</color>
<color name="green">#467A39</color>
<color name="red">#DA2131</color>

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/dimen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<dimen name="default_margin">16dp</dimen>
<dimen name="default_padding">16dp</dimen>
<dimen name="text_size_medium">14sp</dimen>
<dimen name="text_size_big">18sp</dimen>
<dimen name="text_size_medium">16sp</dimen>
<dimen name="text_size_big">26sp</dimen>

</resources>
6 changes: 3 additions & 3 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
~ Created by Mykhailo Nester on 4/23/21 9:53 AM
-->

<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<!-- Base application theme. -->
<style name="Theme.DgcaVerifierAppAndroid" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Primary brand color. -->
Expand All @@ -33,13 +33,13 @@
<item name="colorOnSurface">@color/black</item>

<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<item name="android:statusBarColor">@color/blue_dark</item>
<item name="android:windowLightStatusBar">false</item>

<item name="android:textColorPrimary">@color/grey_100</item>
<item name="android:textColorSecondary">@color/grey_75</item>
<item name="android:textColorTertiary">@color/grey_50</item>

<item name="android:windowBackground">@drawable/splash_bg</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>

0 comments on commit 743a0e8

Please sign in to comment.