4

In Android Studio, if you want to add some data in layout preview, you can simply use tools namespace.

Sample

It was quite simple for TextView, ImageView and so on.

What about a WebView? Is it possible to show an URL (local) in design time?

And what about androidx.viewpager.widget.ViewPager? Is it possible to add some tab just to show anything at design time?

xcesco
  • 4,690
  • 4
  • 34
  • 65

1 Answers1

1

Looking for the same. Incredibly, 2 years later (2021) you can't set a "tools" preview for WebView, according to official docs:

Tools attributes reference

Fer B.
  • 425
  • 5
  • 11