[MS-2] Adding support for the horizontal layouts and rotation#746
Merged
Conversation
…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
… to track the graph's initialization state
… from OrchestratorFragment to its ViewModel. Also, setting the correct state of the 'isActivityRestored' flag
…ctivity-support-configuration-changes
…ulation in ImageProxyToBitmapUseCase
…ulation in ImageProxyToBitmapUseCase
…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
…ber in the ViewModel
…the navigation (in order to have time to see the results on screen) is now handled in the view model
…ut on dashboard fragment
…-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
…never exceeds 300dp
…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
luhmirin-s
reviewed
Jun 5, 2024
| super.onCreate(savedInstanceState) | ||
| if (savedInstanceState != null) { | ||
| orchestratorVm.requestProcessed = savedInstanceState.getBoolean(KEY_REQUEST_PROCESSED) | ||
| orchestratorVm.isRequestProcessed = savedInstanceState.getBoolean(KEY_REQUEST_PROCESSED) |
Contributor
There was a problem hiding this comment.
Is this the only actual change in the file and all other changes are essentially just adding extra line breaks?
Contributor
Author
There was a problem hiding this comment.
Yes, that's right. The formatting was applied.
luhmirin-s
reviewed
Jun 5, 2024
luhmirin-s
reviewed
Jun 5, 2024
luhmirin-s
reviewed
Jun 5, 2024
| 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.* |
Contributor
There was a problem hiding this comment.
This is where wildcard hate crosses the line :D Please leave the wildcard.
luhmirin-s
approved these changes
Jun 5, 2024
Contributor
luhmirin-s
left a comment
There was a problem hiding this comment.
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
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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 hostingOrchestratorActivity