Skip to content Skip to sidebar Skip to footer

Unable To See Completed View Layout In Android Studio

I am creating a vertical LinearLayout that will be displayed in a vertical ScrollView. I can't find a way in Android Studio to see the portion of the LinearLayout that is below th

Solution 1:

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..

enter image description here

Step 2) Within the Your Virtual Devices dialog click the Create Virtual Device button.

enter image description here

Step 3) Within the Select Hardware dialog click the New Hardware Profile button.

enter image description here

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).

enter image description here

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. enter image description here

Solution 2:

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.

Solution 3:

Found a easier solution, in your layout add something like below and adjust as you need:

android:layout_marginTop="-1500dp"

Solution 4:

in new version of android studio (i don't know from which version, but i'm using latest 2.3.3 now) you can resize your preview layout by drag it

enter image description here

Solution 5:

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.

Post a Comment for "Unable To See Completed View Layout In Android Studio"