-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Preview image in Android Studio layout editor #9480
Comments
We should consider using the new |
I tried running with approach in OP but the IDE isn't able to perform network requests for content in the layout editor. For now I removed integration in #9657 (the preview image is taking up too much space in the aar). Let's wait until AS 3.0 is released with the |
Have you ever tried creating a custom layout which loads the preview image when public class CustomView extends View {
public CustomView(Context ctx) {
super(ctx);
if(isInEditMode()) {
loadResourceUrl();
}
}
} ☝️ could be another solution ¯\_(ツ)_/¯ |
yes, see #9480 (comment) |
How much of a size increase would be acceptable for this feature? I noticed that the previously bundled preview images are JPEGs, whereas PNG or GIF would be more efficient representations of Streets style screenshots. Perhaps we could even switch to a less busy style like Light or Dark, or come up with a more abstract, stylized representation that could be represented as a vector drawable, to further reduce the file sizes? |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
To support the visual layout editor in Android Studio. We currently package a preview image inside our SDK. This image isn't used at runtime and it's currently growing the resulting .aar file. We should look into hosting this image online and only download it when the visual layout editor is shown to the developer.
The preview image can be found here
The text was updated successfully, but these errors were encountered: