Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dual pages on foldable devices #2670

Merged

Conversation

kadirkid
Copy link
Contributor

@kadirkid kadirkid commented Apr 21, 2024

Goal

Support dual pages on foldable devices while the orientation is still portrait. This will only be supported on foldable devices that fold horizontally.

Screenshot

@@ -33,7 +33,7 @@ object PagerActivityModule {
@Provides
@ActivityScope
fun provideImageWidth(@ActivityContext context: Context, screenInfo: QuranScreenInfo): String {
return if (QuranUtils.isDualPages(context, screenInfo)) {
return if (QuranUtils.isDualPages(context, screenInfo, false)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no way of injecting this value here so ignoring it for now. @ahmedre Could you elaborate a bit more on the use case here?

Copy link
Contributor

Choose a reason for hiding this comment

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

discussed offline, moving forward, will consider moving this check into QuranScreenInfo if possible.

@kadirkid kadirkid marked this pull request as ready for review April 21, 2024 18:27
@ahmedre
Copy link
Contributor

ahmedre commented Apr 21, 2024

JazakumAllah khairan @kadirkid - this fixes #1553.

@ahmedre ahmedre enabled auto-merge April 21, 2024 18:51
@ahmedre ahmedre merged commit 57ef28f into quran:main Apr 21, 2024
2 checks passed
@ahmedre ahmedre mentioned this pull request Apr 21, 2024
@kadirkid kadirkid deleted the add-support-for-dual-pages-on-foldable-devices branch April 21, 2024 18:58
Copy link

OLD: app-madani-debug.apk (signature: V1, V2)
NEW: app-madani-debug.apk (signature: V1, V2)

          │            compressed             │            uncompressed            
          ├───────────┬───────────┬───────────┼───────────┬───────────┬────────────
 APK      │ old       │ new       │ diff      │ old       │ new       │ diff       
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼────────────
      dex │  20.3 MiB │  20.3 MiB │ +85.2 KiB │  65.5 MiB │  65.7 MiB │ +249.2 KiB 
     arsc │   2.2 MiB │   2.2 MiB │    +826 B │   2.2 MiB │   2.2 MiB │     +832 B 
 manifest │   5.6 KiB │   5.6 KiB │      -3 B │  27.1 KiB │  27.1 KiB │        0 B 
      res │   1.6 MiB │   1.6 MiB │     -85 B │   1.8 MiB │   1.8 MiB │        0 B 
    asset │ 404.2 KiB │ 404.2 KiB │       0 B │ 678.6 KiB │ 678.6 KiB │        0 B 
    other │ 188.6 KiB │ 188.8 KiB │    +243 B │ 385.6 KiB │ 385.8 KiB │     +256 B 
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼────────────
    total │  24.7 MiB │  24.7 MiB │ +86.1 KiB │  70.6 MiB │  70.8 MiB │ +250.3 KiB 


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants