Skip to content

[MS-2] Adding support for the horizontal layouts and rotation#746

Merged
alexandr-simprints merged 52 commits into
mainfrom
MS-2-epic-landscape-support
Jun 19, 2024
Merged

[MS-2] Adding support for the horizontal layouts and rotation#746
alexandr-simprints merged 52 commits into
mainfrom
MS-2-epic-landscape-support

Conversation

@alexandr-simprints
Copy link
Copy Markdown
Contributor

@alexandr-simprints alexandr-simprints commented Jun 4, 2024

As we are striving to improve the UX within the SID application, it is necessary to start targeting tablet devices alongside regular phones.

One of the key differences from phone usage is that tablets are often used horizontally (in landscape mode). However, currently, the SID provides only portrait (vertical) orientation support, making it inconvenient to use the application sometimes, having to physically rotate the device if the callout application is used in landscape mode.

This epic aims to address this UX concern and approach the implementation by initially adding the landscape support individually for each fragment of the biometrics flow (i.e. LoginFragment, ConsentFragment, etc.), and then by adding the landscape support for the hosting OrchestratorActivity

alexandr-simprints and others added 30 commits January 18, 2024 17:56
…rd activities. Adding some minor temporary fixes so that application won't crash in the landscape mode
…ity. Currently, we will be focusing on the rotation support for the biometrics flow only
… from OrchestratorFragment to its ViewModel. Also, setting the correct state of the 'isActivityRestored' flag
…y. Currently, we will be focusing on the rotation support for the biometrics flow only
…upport-configuration-changes

MS-214 Orchestrator to support configuration changes
… within LoginFormViewModel, and observing it from LoginFormFragment
…tion-process-is-cancelled-on-rotation

[MS-220] Moving loading state indication to a separate LiveData field
…selection-tab-doesnt-save-the-state-after-rotation

[MS-221] ConsentViewModel now saves selected tab state
…erFragment. Flag responsible for asking the permission is persisted across the configuration changes
…ler-fragment-add-rotation-support

[MS-222] Rotation support for ConnectScannerControllerFragment
…Fragment in its scoped ViewModel, so that it is not re-initialized twice after the rotation
…the navigation (in order to have time to see the results on screen) is now handled in the view model
alexandr-simprints and others added 12 commits May 20, 2024 16:50
…-overlaps-the-login-button

[MS-452] 'change backend url' link no longer overlaps the login button
… the screen was rotated on the splash screen. By movind the `isRequestProcessed = true` to the bottom of the intent handling chain in the OrchestratorFragment, it is possible to get rid of the `isActivityRestored` flag.
…t, so that the face capture screen elements won't overlap each other
…leads-to-a-freeze-of-the-orchestration-flow

[MS-451] Splash screen rotation no longer leads to a freeze of the orchestration flow
…on-horizontal-mode-layout

[MS-468] Adding a separate horizontal fragment_confirmation.xml layout, so that the face capture screen elements won't overlap each other
…zontal and vertical screen orientations. Due to historical reasons, the preview is formed around the guideline in the layout, whose height is defined as percentage of the screen height. It is hardcoded to 0.3 (30% of sceren height), and it doesn't work for the smaller horizontal dimensions. Thus, the new horizontal layout is introduced, that has a guideline set at the 0.5 (50% of screen height).
…blic getter for the 'cropRect' property for testing purposes
…en-support-configuration-changes

[MS-226] LiveFeedbackFragment now utilizes different layouts for horizontal and vertical screen orientations
super.onCreate(savedInstanceState)
if (savedInstanceState != null) {
orchestratorVm.requestProcessed = savedInstanceState.getBoolean(KEY_REQUEST_PROCESSED)
orchestratorVm.isRequestProcessed = savedInstanceState.getBoolean(KEY_REQUEST_PROCESSED)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only actual change in the file and all other changes are essentially just adding extra line breaks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right. The formatting was applied.

import com.simprints.infra.events.event.domain.models.AlertScreenEvent.AlertScreenPayload
import com.simprints.infra.events.event.domain.models.AlertScreenEvent.AlertScreenPayload.AlertScreenEventType
import com.simprints.infra.eventsync.event.remote.models.ApiAlertScreenPayload.ApiAlertScreenEventType
import com.simprints.infra.eventsync.event.remote.models.ApiAlertScreenPayload.ApiAlertScreenEventType.*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where wildcard hate crosses the line :D Please leave the wildcard.

Copy link
Copy Markdown
Contributor

@luhmirin-s luhmirin-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contents are great, but I strongly disagree about some code-style choices.

# Conflicts:
#	face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/FrameProcessor.kt
#	face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackFragment.kt
#	face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackFragmentViewModel.kt
@sonarqubecloud
Copy link
Copy Markdown

@alexandr-simprints alexandr-simprints merged commit 1e5309c into main Jun 19, 2024
@alexandr-simprints alexandr-simprints deleted the MS-2-epic-landscape-support branch June 19, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants