Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 841
bvv Avatar asked Sep 08 '14 12:09

bvv


People also ask

How to inspect layout in Android Studio?

To open the Layout Inspector, first launch your app on a connected device or emulator. Then open Android Monitor window, select your device and app process, and then click Layout Inspector . You can also open it by clicking Tools > Android > Layout Inspector in the menu bar.


1 Answers

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> 
like image 123
l0v3 Avatar answered Oct 21 '22 13:10

l0v3