Bug 57078 - Previewer opens Android preview when iOS project is set as startup
Summary: Previewer opens Android preview when iOS project is set as startup
Status: REOPENED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Xamarin.Forms Previewer (show other bugs)
Version: Trunk
Hardware: PC Mac OS
: High major
Target Milestone: 15.6
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-01 20:52 UTC by Pierce Boggan [MSFT]
Modified: 2017-10-05 17:35 UTC (History)
7 users (show)

See Also:
Tags: vsfmbb08
Is this bug a regression?: ---
Last known good build:


Attachments

Description Pierce Boggan [MSFT] 2017-06-01 20:52:19 UTC
# Steps to Reproduce
1. File -> New -> Forms app.
2. Open one of the XAML pages.
3. Enable the previewer (if not already enabled).

# Expected Behavior
Previewer opens current startup project's preview. For example, the default on a File -> New is iOS. When I open the previewer, it should default the first view it attempts to preview to the default (which in this case, should be iOS).

# Actual Behavior
Previewer always opens to Android by default, as seen below:
https://www.screencast.com/t/x9lvaUDx

# Additional Info
Environmental Info:
https://gist.github.com/pierceboggan/7e047feac3f9baae0b1d39c00e816753
Comment 1 John Miller [MSFT] 2017-08-16 19:49:41 UTC
@Pierce,

I couldn't reproduce this with 7.2. Instead, it always shows the iOS tab selected in the previewer regardless of what my startup project is. Can you provide some more details and confirm if you see this with 7.2? 

Note* I can't view the screencast because of flash.
Comment 2 Alan McGovern 2017-08-28 13:00:43 UTC
The current logic is:

* If you have an iOS only project then iOS will be the default option.
* If you have an Android only project then Android will be the default option.
* If you have iOS and Android then *by default the very first time you open a xaml file* it will use Android.
* In all other scenarios it will use whichever view the user used previously. i.e. if you never change it then it will always show android (as expected). If you manually decide to view as iOS then future xaml files will open under iOS by default, the assumption being that you choose iOS for a reason and we should respect that decision.

Using the startup project in the manner you suggest would mean forcing the user to constantly change to another view.
Comment 3 Joseph Hill 2017-08-28 15:24:01 UTC
The heart of this request was to get this behavior changed:

> If you have iOS and Android then *by default the very first time you open a xaml file* it will use Android.

Because the very first time you open a XAML file, you are evaluating Xamarin and Xamarin.Forms, and we want to make sure you have as pleasant of an experience as possible.  On Mac, the Android experience is significantly worse than the iOS experience.
Comment 4 Alan McGovern 2017-08-28 15:28:42 UTC
> On Mac, the Android experience is significantly worse than the iOS experience.

What is worse about the android experience than the iOS experience? Is there something we can address there?

The context for this decision is: We always use android because it used to be an order of magnitude faster to initialise Android than it was iOS. If you're working in Visual Studio it also means we do not force people to have a paired Mac.

Note You need to log in before you can comment on or make changes to this bug.