Oct 02 2020 09:22 AM - edited Oct 02 2020 09:27 AM
Hi team,
I hope you are all doing great! I just got my very first feedback of running my little experimental app on a real Surface Duo device.
It's awesome to see it live in action without having any chance to try it by myself.
Nevertheless, I wittnessed that the rendering (one column vs. two columns) is rendered differently in my emulator app and on the real device.
Real device
Emulator screenshot
Source
I just use the ScreenHelper function:
ScreenHelper.IsDualScreenDevice(Application.Context);
I use this value in my master view code behind to set the width of the second column.
// Check if app runs on a Duo.
if(DependencyService.Get<ISurfaceDuoInformationService>().IsDuo())
{
SecondColumnWidth = new GridLength(1, GridUnitType.Star);
}
else
{
SecondColumnWidth = new GridLength(0, GridUnitType.Absolute);
}
Thanks for any helpful tip!
Oct 20 2020 02:25 PM
@tscholze can you clarify your question? In the second (emulator) screenshot, the app isn't spanned onto both screens.
Can you put the app in the same state (spanned across two screens) and add the screenshot so we can see how that looks on the emulator? It might also be helpful to explain what you expect the behavior to be, and to confirm via debugging that
IsDuo()
returns the expected value.
Nov 09 2020 11:57 PM - edited Nov 09 2020 11:58 PM
Hi @Craig_Dunn,
sorry for my really late response. I attached a screenshot on how it looks using the emulator.
You see on the left side two columns aka "RSS Feed", and "YouTube Feed".
I present the YT column only if the isDuo() check returns true. It seems that the check returns on an actual Surface Duo device "false". Due to the fact that I have no Duo available, I cannot attach a debugger on a released version.
It could be also a timing issue. It is just weird why it works as intended on the emulator but not on a real device. *hm*
(The "insert photo" button did not work, that's why it is just an attachment)