Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the default preview device in Android Studio?

When I'm creating a new project, the default preview device appears as Nexus 4. Is there a way to change it to some other device?

like image 940
Kutsan Kaplan Avatar asked Mar 03 '16 21:03

Kutsan Kaplan


People also ask

What is the default view in designing an application in Android Studio?

By default, Android Studio displays your project files in the Android project view, as shown in figure 1. This view is organized by modules to provide quick access to your project's key source files.

How to see Live changes in Android Studio?

Subsequent edits don't reset composition. Live Edit is available in the Electric Eel Canary channel as an experimental feature. To turn it on manually, navigate to File > Settings > Editor > Live Edit (Android Studio > Preferences > Editor > Live Edit on a Mac).


2 Answers

Recently I had the same issue. It seems that you cannot use a device from the "virtual device" category. That way only the selected layout will be shown inside the chosen device.

In order to change the default device for all layouts you have to choose from some of the other categories (the ones inside the red rectangle):

enter image description here

I have chosen "6.0 1440 x 2560" from "Phone" and all my other layouts changed to this device (before I was selecting "Nexus6_API_29_Android" which was my virtual device, and I had to change it on every layout manually)

like image 159
rimes Avatar answered Oct 13 '22 19:10

rimes


  1. Change the preview device>>for example: nexus5x or others.
  2. File--Export Setting, then choose a dictionary to save it. For example, I save it on my desktop, next you will see a settings.jar on your desktop.
  3. File-Import Setting, choose the settings.jar.
  4. Android Studio will want to restart itself, click OK

My English is very poor. I'm so sorry. Maybe it works well. I'm not sure. You can try it.

like image 2
xlc Avatar answered Oct 13 '22 20:10

xlc