Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 the bottom of the ScrollView. Is there any way to see the full layout rather than constraining it to the viewport provided by the renderer?

like image 976
drew Avatar asked Feb 04 '14 23:02

drew


People also ask

Why is auto complete not working in Android Studio?

if the autocomplete isn't working for you in Android Studio, just press File and uncheck the Power save mode, it should work fine after that. if power save mode is already unchecked then first check then uncheck them.

Where is the layout editor in Android Studio?

To make room for the Layout Editor, hide the Project window. To do so, select View > Tool Windows > Project, or just click Project on the left side of the Android Studio screen. If your editor shows the XML source, click the Design tab at the top right of the window.

Where is Activity_main XML located?

activity_main. xml: This file located in the res/layout folder. It defines what components to display and how to display them in referenced activity view. Double click this file, you can see the content in the right panel, it has a Design view and a Text view, you can click the bottom Design and Text tab to switch.


2 Answers

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

like image 76
Brabbeldas Avatar answered Oct 22 '22 23:10

Brabbeldas


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.

like image 41
drew Avatar answered Oct 22 '22 23:10

drew