User Profile
khalper
Joined Nov 17, 2021
User Widgets
Recent Discussions
Re: is TwoPaneBackStackEntry composable list of routes incompatible with arguments / URI Routes?
Hi tscholze and Papes96, I'm working on updating TwoPaneLayoutNav to support navigation with arguments on this branch: https://github.com/microsoft/surface-duo-compose-sdk/tree/khalp/twopanelayoutnav-args I will be testing out the current approach for the next sprint, but if you have any other thoughts/feedback on if this implementation would be helpful for your use case, let me know!1.5KViews2likes0CommentsRe: is TwoPaneBackStackEntry composable list of routes incompatible with arguments / URI Routes?
Hi tscholze and Papes96, thanks for your questions. Unfortunately, you're right that the current implementation does not support arguments in the list of routes. While we work on a fix for this, I hope you can continue to use the original TwoPaneLayout composable to provide more flexibility. Sorry for the inconvenience and thanks for providing feedback!1.6KViews2likes3CommentsRe: Looking for MVP 22/23 recommendations (who to follow)
Hi Tobias, Apologies for the late reply! For generic MVPs, you can check out the Xamarin list or the Microsoft MVP website. For members of the large screen/foldable community, we try to monitor Android newsletters and keep up to date with the latest blog posts! I like to check for blog posts from Android Weekly and jetc.dev, and it's also helpful to read articles published by the official Android Developers team. Hope that's a helpful start, if you have any articles/authors you'd like to share, please let us know π633Views0likes0CommentsRe: Looking for a list with foldable & large-screen device related sessions
tscholze Hi Tobias, thanks for the question! Here's a list of some of our most recent talks - if I find any other links, I'll reply with more π General foldable content: Samsung Developers podcast β Foldables Roundtable droidcon Berlin: The age of large screen & foldables droidcon Berlin: Introduction to dual-screen and foldables development droidcon Berlin: Enhance your single screen designed-app to make it shine on foldable devices Surface Duo One Dev Questions playlist Flutter: Flutter Global Summit: Making a gamepad for my Flutter game Flutter Vikings: Build apps for foldables with Flutter droidcon London: Foldable Layouts in Flutter droidcon London: Flutter panel Jetpack Compose: droidcon SF: Foldable, meet Compose Testing: MS Build: Automated testing for Android foldables Cross-platform: droidcon online: PWAS can do anything, even dual-screen Android apps MS Build: Adapting Xamarin apps for Surface Duo MS Build: How to bring your Android apps to Surface Duo with Xamarin583Views1like1CommentRe: Stream idea: Adapting maps (but not GMaps) for foldables and large screen devices using Compose
Hi Tobias, thank you for the feedback! We understand that maps are commonly used in applications and that it would be useful to know some alternatives to Google Maps. We'll take your suggestion into consideration, and as always, thanks for your continued engagement in our Surface Duo developer community π In the meantime, if you do end up using Bing Maps, you can check out our dual screen experience example for an example of how to use that SDK.1KViews1like1CommentRe: More control over the placement of activities on the screens
EvgenyZobnin Hi Evgeny, thanks for your questions! Like you guessed, the Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT flag produces different results depending on what is currently shown in each screen - you can read more about this in the documentation or check out our sample. In Android 12L, the behavior of the flag will be updated for large screens as described in this blog post. Unfortunately, at the moment, there is no way to always make sure an intent is launched on the second screen. You can use the Jetpack Window Manager library to access the window metrics for an activity and check its bounding rectangle - however, this won't tell you about where other applications/activities are located. Unfortunately, it is also not currently possible to find out information about where other applications are running. If any new APIs are created in the future to address these issues, we will be sure to let you know!954Views1like1CommentRe: UI question on foldable: How to display a small amount of content on top of an extended canvas?
tscholze No problem, we're always glad to hear updates on your project! Thanks for explaining the other screens more, in that case I think you would probably want to add a "Settings" icon to the TopAppBar, since that information is static and accessible at any time. For the map markers, since the information changes depending on which marker is tapped, I agree that a sheet would make sense - one benefit of using Compose is that you can create a base composable with all of the common formatting and then just pass in the dynamic content you want to show! And don't worry about that, it sounds like you're already learning a lot with this project! When in doubt, I would say that the Material Design documentation is always a good resource π1.2KViews0likes0CommentsRe: UI question on foldable: How to display a small amount of content on top of an extended canvas?
Haha well I'm glad the sample was helpful to you in that way! Now that you mention it, it is recommended to use a navigation rail for primary app destinations, but if the content doesn't take up the whole screen, I'm not sure if it would count as a destination. Yuran and I discussed this some more and we think that some alternative solutions could be Floating Action Buttons or buttons in the TopAppBar. It seems like the map is your main screen and that the About/Settings views have minimal content that can temporarily overlay the map, so maybe something like that would work better for you. A Sheet could still work to show that content, or maybe even a Dialog. In the end, though, it's totally up to you! We couldn't find any specific official guidance for this use case, and navigation rails are recommended for large screens, so whichever approach you like best will work just fine π1.3KViews0likes2CommentsRe: UI question on foldable: How to display a small amount of content on top of an extended canvas?
Hi Tobias, Thanks for your question! To be honest, I also am not an expert in Android components/Material Design, but from what you have described, it sounds like a Sheet would fit your needs. We do use a custom component similar to a BottomSheet/Drawer in the NavigationRail Compose sample, but like you mentioned, some content is still shown when the component is collapsed, so that wouldn't fit your exact use case.1.4KViews1like0CommentsRe: Will be "Android app on Windows 11"-developers a part of this community?
Hi Tobias, Thanks for your question and apologies for the delayed response! Enhancing apps to run on Windows 11 fits in with our goals of improving apps on large screens and foldables, so a lot of the guidance we share will be relevant for that form factor. However, for Windows Subsystem for Android questions, we would recommend referring to their specific resources: - Documentation - Q&A forum1KViews1like1CommentRe: Is it okay to Z-layer the two pane layout component on top of another component?
tscholze From a design perspective, it is approved to sometimes have a fullscreen map view (Extended Canvas pattern) and then otherwise have separate screens that follow the other design patterns. You can actually see this in our Dual Screen Experience Example (Play Store link, GitHub link), where one destination in the bottom navigation bar displays a fullscreen map and the others show content that's separated into two panes. If you're asking about how TwoPaneLayout can be used, then that design should also be ok! Depending on when you want the map view to show, you could try changing the pane mode of the layout, or you could add a condition in your code to check whether your TwoPaneLayout or a different component should be shown. Please let us know if you need any other clarifications!854Views1like1CommentRe: Cannot find import com.microsoft.device.dualscreen.windowstate.WindowState
tscholze Awesome, and apologies for the difficulty in finding the correct version string! If that happens again in the future, you can check the "Add to your project" section in the README to see the import string for the latest library version.1.4KViews1like0CommentsRe: App crashes with "Didn't find class "androidx.window.WindowManager""-exception
tscholze Glad to hear you got your project to build! Sorry that you're facing issues with transforming our samples, but the good news is that your issue should be solved by updating to the newest version of TwoPaneLayout: implementation 'com.microsoft.device.dualscreen:twopanelayout:1.0.0-alpha10' Some of the older versions of TwoPaneLayout depend on older version of the Jetpack Window Manager library, and this can occasionally cause compatibility issues. We try to keep our own SDK dependencies updated in our samples, so you can refer here if you ever have doubts. Also, I think there are still a few duplicate imports/imports without version numbers in your gradle.kts file - try pasting in the edited version below and let me know if that helps: dependencies { var koin_version = "3.1.5" var navigation_version = "2.4.0-rc01" var compose_version = "1.1.0-alpha06" // Android implementation "androidx.navigation:navigation-compose:$navigation_version" implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation "androidx.compose.ui:ui:$compose_version" implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0' implementation 'androidx.activity:activity-compose:1.4.0' // Google implementation 'com.google.android.material:material:1.5.0' // JetBrains implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0' // Flow layout implementation 'com.google.accompanist:accompanist-flowlayout:0.22.0-rc' // Microsoft implementation 'com.microsoft.device.dualscreen:twopanelayout:1.0.0-alpha10' implementation 'com.microsoft.device.dualscreen:windowstate:1.0.0-alpha1' // Ktor implementation("io.ktor:ktor-client-core:1.6.7") implementation("io.ktor:ktor-client-cio:1.6.7") implementation("io.ktor:ktor-client-serialization:1.6.7") // Koin implementation "io.insert-koin:koin-android:$koin_version" implementation "io.insert-koin:koin-androidx-compose:$koin_version" // Map implementation("com.google.android.libraries.maps:maps:3.1.0-beta") implementation("com.google.maps.android:maps-v3-ktx:2.2.0") implementation("androidx.fragment:fragment-ktx:1.4.0") // Testing testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" }3.1KViews1like2CommentsRe: Cannot find import com.microsoft.device.dualscreen.windowstate.WindowState
tscholze No worries, we welcome all questions π From the dependencies you included, it looks like you just need to add the version number for the library: implementation βcom.microsoft.device.dualscreen:windowstate:1.0.0-alpha1β And for your NavigationRail question, that component actually comes from the 'androidx.compose.material' library β as long as you have version 1.1.0-alpha01 or later, I believe you should be able to access the component. I tried updating our 'androidx.navigation:navigation-composeβ to version 2.4.0-rc01 and the sample still ran correctly, but let us know if youβre still experiencing issues with using a NavigationRail.1.4KViews0likes2CommentsRe: What could be a reason that some apps (e.g. Microsoft Word) are not available on the Duo?
tscholze Hi Tobias, thanks for your patience! We were able to find the answers to your questions: The Office team's strategy for mobile support is their Office app, which provides access to all the dual-screen enhanced Office applications. The development efforts were concentrated on that app version, and the stand-alone versions were filtered out in Play Store because they do not support dual-screen experiences that the team built for the Duo in the Office app. You can find more information about the Office app here: https://www.theverge.com/2019/11/4/20942023/microsoft-office-ios-android-app-features-word-excel-powerpoint. Yes, this was done via Google Play Store by choosing to exclude specific devices for the Word/Excel/Powerpoint apps To provide feedback about specific apps, your best bet would probably be to send feedback within the app itself (in Office, click your profile picture > Send feedback). However, please donβt hesitate to post here in the feedback forum if you think we can help answer your questions!1.2KViews1like1CommentRe: What could be a reason that some apps (e.g. Microsoft Word) are not available on the Duo?
Hi Tobias, thanks for your questions! I just wanted to let you know that we're working on finding some answers for you, but it may take a few more days - thanks for your patience π1.2KViews0likes0Comments
Recent Blog Articles
No content to show