Sometimes I'm editing the layout resource for a list item or similar small UI component. This is nice, but the available screen resolutions in the layout editor in Android Studio are all way too big to get a reasonable sense of how the list item or whatever will look. Even when using the smallest resolution available (2.7" QVGQ) there's always a ton of unused space:
If I try to have elements match_parent
or match_constraint
then they blow up to take up the entire space of the editor:
How can I use custom screen resolutions in Android Studio's layout editor? It would let me get a better idea of how these smaller UI component layouts will actually look. My Google searches have all been futile. Within Android Studio I was able to add a new device definition with a very small resolution, but it doesn't show up in the list of available resolutions in the layout editor. Help!
UPDATE:
I checked in the "Generic Phones and Tablets" menu as per Chisko's suggestion below, but my virtual device wasn't there.
BUT after restarting Android studio, it appeared:
So Chisko is right, but there also appears to be a bug in Android Studio where the creation of a virtual device isn't reflected in the "Generic Phones and Tablets" menu until a restart has occurred.