I've just discovered how. You need to create a user defined device definition in Android AVD - I created one that was 480 x 4000 pixels. Exit and restart Android Studio and then you can select this device in the preview renderer and can see 4000 pixels worth of LinearLayout.
Android Studio will offer a toggleable full view, if the ScrollView is the root of the layout. I had put mine on top of the default RelativeLayout and had to manually fix that in the XML before the GUI would give me the full view.
Like Drew said, creating a user defined device definition has been the only solution which worked for me. Below i show you the steps to follow:
Step 1)
Within the preview-pane, open the Virtual Device Selection drop-down and select Add Device Definition..
Step 2)
Within the Your Virtual Devices dialog click the Create Virtual Device button.
Step 3)
Within the Select Hardware dialog click the New Hardware Profile button.
Step 4)
Within the Configure Hardware Profile dialog specify (f.e.) a Resolution of 720 x 4000 px and a Screensize of 12 inch. Also setting the Screensize results in a density of xhdpi (thanks to Mete).
Step 5) Close all dialogs and restart Android Studio.
Step 6) Open the Virtual Device Selection drop-down. The new user defined hardware profile can be found under Generic Phones and Tablets.
Another quick alternative solution is to hide the layouts temporarily at the top so that the layouts at the bottom can appear in the visible window in Android Studio.
Put android:visibility="gone" on the layouts that you want to hide.
Update: Now you can scroll a ScrollView directly inside preview panel
(I tested on Android studio version 2.3.2)
Short answer: Right click on your ScrollView and select Refactor > Extract > Layout.
Android-studio will extract your ScrollView into a new layout file and put tools:showIn="@layout/original_layout_file" attribute at root layout(your ScrollView).
Note: Android-studio will preview full layout if root layout is ScrollView.
You can use scrollY attribute to scroll the ScrollView in the preview. Using scrollY attribute with tools namespace will only scroll the view in the display and not in the actual app. And make sure you use px as the unit with scrollY attribute.
My layout is long and need to scroll layout even using the vertical long resolution and when I set the layout editor to high resolutions, the screen does not scroll completely and smoothly
By setting the layout to
3.2_HVGA_slider_ADP1_API_27, the screen scrolled and my problem was solved