Obsolete
Status Update
Comments
fr...@gmail.com <fr...@gmail.com> #2
Any update on this? I would love to see this too. Since the `layout` is provided I was hoping to get it included in the preview. Maybe it could be a special `tools:` flag to trigger an inflate during the Android Studio preview?
tr...@gmail.com <tr...@gmail.com> #3
Any update on this?
sa...@google.com <sa...@google.com> #4
Thank you for your feedback. We assure you that we are doing our best to address all issues reported. For now, we will be closing the issue as won't fix obsolete.
da...@archive.ittybittyapps.com <da...@archive.ittybittyapps.com> #6
You can add tools:visibility="visible"
and that should work. Like so:
<ViewStub
android:id="@+id/..."
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout="@layout/..."
android:visibility="visible"
tools:background="#3300ff00"
tools:visibility="visible" />
da...@archive.ittybittyapps.com <da...@archive.ittybittyapps.com> #7
The downside of the above is that anything constrained to the ViewStub
will not be where they're supposed to.
si...@gmail.com <si...@gmail.com> #8
1
si...@gmail.com <si...@gmail.com> #9
It has a problem in ConstraintLayout.
st...@gmail.com <st...@gmail.com> #10
Comment has been deleted.
st...@gmail.com <st...@gmail.com> #11
Tools visibility is not working for me. Makes ViewStub unusable for my complex layouts. Looks like I'll have to stick to includes for now.
st...@gmail.com <st...@gmail.com> #12
My bad, tools visibility works after all. I mean the view renders as it should however when placed in a grid layout it is not selectable from the designer preview.
Description
Example:
<ViewStub
android:id="@+id/..."
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout="@layout/..."
android:visibility="visible"
tools:background="#3300ff00"/>
As you can see, I tried to force it to create the layout, using the visibility, as suggested here:
It seems this works only at runtime. I want to just show it in design time, which is why I would have changed it to "app:visibility" later, but even the normal "android:visibility" doesn't work.
Please allow to show ViewStub in the UI designer and preview.
Maybe even add a new tag for views that will be ignored for the app itself, yet still be shown in the UI designer.