I'm writing application without UI layout xml files
Why?
The problem is i cant see my widgets on screen only blank activity
To use a ViewPager
, you do not call addView()
. Instead, you create a PagerAdapter
that will return pages as needed, and attach the PagerAdapter
to the ViewPager
using setAdapter()
.