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.
If you added a custom device try looking on Generic Phones and Tablets option. Refer to screenshot:
Follow these steps:
1) Click on "Add Device Definition..."
2) Make your specific device in opened window
3) restart Android Studio
4) you can find Your New device in the list. (above of "Generate Phones and Tablets" in AVD Devices part)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With