Fixed
Status Update
Comments
uc...@google.com <uc...@google.com> #2
Thank you for suggesting this enhancement. We value the feedback from our community and hope to review your suggestion in an upcoming sprint.
ni...@google.com <ni...@google.com>
di...@google.com <di...@google.com> #3
With sample data in 3.0, you can now have placeholder images that are not part of the compiled apk. You just need a sampledata directory in your project with a subdirectory containing all the images you want to use as placeholders.
You can refer those images from "tools" attributes. Also, there are predefined stock images like @sample/avatars or @sample/background/scenic
You can refer those images from "tools" attributes. Also, there are predefined stock images like @sample/avatars or @sample/background/scenic
lb...@gmail.com <lb...@gmail.com> #4
@3 This is not what I wrote.
I wrote a view.
Not an image.
I wrote a view.
Not an image.
lb...@gmail.com <lb...@gmail.com> #5
@3 However, this can also be useful. In which folder do I put those images? On "res/sample" ?
lb...@gmail.com <lb...@gmail.com> #6
@3 The "sampledata" folder name doesn't seem to work. Wrote about it here:
https://stackoverflow.com/q/46192545/878126
di...@google.com <di...@google.com> #7
I think it's been answered already there but please do let us know if you have any questions.
lb...@gmail.com <lb...@gmail.com> #8
@7 Currently the answer I see shows it either doesn't work, or unknown how to make it work. I don't know how this new feature is called, so it's still very hard to find about it on the Internet.
In any case, what I suggested here is not an image. I suggested a view.
Why did you mark it as "fixed", if it's not the same feature?
In any case, what I suggested here is not an image. I suggested a view.
Why did you mark it as "fixed", if it's not the same feature?
Description
1. Suppose you have a container of views, that its views are inflated only at runtime.
However, for the preview of the container within other layouts, you'd like to see a nice preview of it, yet avoid the inflation of what you wish to show at runtime.
2. A customized view or a library's view (like of ad banners), that you'd like to see how it fits inside layouts.
3. A temporary situation where some images are missing and the designer needs to send them in the future, so we put some placeholders instead, and replace them with real content later.
For all this, I suggest new feature:
1. allow to set a view to be inflated&shown only in the IDE.
2. allow to use an image that's only to be used by the IDE, and not be included in the app itself.
I know we can use tools:src for images, but it requires the image to be inside the app's folders. I also know about ViewStub, but it still has the view in the view-hierarchy of the app.