'Xamarin Android - Add theme to intent
I have this problem White screen is displayed while switching between Activities
When I try to send an email using Xamarin.Essentials.Email.ComposeAsync I get a white screen. This method is inside a Fragment rather than an Activity class so I can't use android:name on the <activity> element.
I want to know if I can implement the style on my current Manifest.xml file
<queries>
<intent> //add android:theme="@style/MyTheme" somewhere here???
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>
Solution 1:[1]
I had tried to use the Xamarin.Essentials.Email.ComposeAsync and met the same problem. But the reason of the white screen shows is the email app which you had launched.
When we use the Xamarin.Essentials.Email.ComposeAsync to send an email, it will launch the default email app which the Xamarin.Essentials.Email support such as the GMail. And the white screen is the preview window of GMail.
We can change the preview window of our app by customing a theme which sets the 'android:windowDisablePreview', but we can't change the others.
If you need more information, you can check the answer's link in the case you mentioned.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Liyun Zhang - MSFT |
