How i can see long layout in preview in Android Studio

I have a long Screen, and i set ScrollView, but in Preview screen in Android Studio i do not see part of the Screen. How i can see it?enter image description here


Solution 1:

I found another & pretty cool solution. It's not about size of the layout in preview. You can simulate scrolling instead, to see the hidden content.

Use with tools, as it has influence only in preview. Then increase/decrease value for "scroll".

<YourRootViewOfAnyType
xmlns:tools="http://schemas.android.com/tools"
...
tools:layout_marginTop="-200dp"
...
>

</YourRootViewOfAnyType>

Solution 2:

Here's The Magic Solution :

enter image description here

Click on the highlighted button to increase the size of the preview window. Note : You can increase the size to any desired size!

enter image description here

Then use the zoom button to zoom and see the preview.

enter image description here

Here's how it will look then.

enter image description here

To get the scroll Bar in application ....enter image description here

Use scroll view as the root view in your .xml file and then make the nesting of layouts.

If you don't want the scrolling image to fade away in app then add the code under ScrollView :

android:fadeScrollbars="false"

Solution 3:

If you put your layouts in a ScrollView it should automatically (at least in Android Studio) show you everything.

Another workaround is to make a new AVD with a big resolution, something like 4000px height, and use that for preview, worked for me :)

Solution 4:

Open the xml of the layout. In the preview pane press the 'Show Design + Blue print' button. This will show the design along side the blue print. Hover the mouse over the blue print, you'll then be able to scroll. The design beside it will scroll simultaneously.

enter image description here

Solution 5:

Update your android studio now you can see the preview while scrolling .