[英]ViewPager's Content Inside is not visible when Using with scrollView
I am new to android development so I am doing practice to design layout and also java so I want to make a design like this can any give me solution or suggestion of what to use here.我是android开发的新手,所以我正在练习设计布局和java,所以我想做这样的设计可以给我解决方案或建议在这里使用什么。
and note also it is inside scroll view
and All the stuff inside it should be shown well.并注意它在scroll view
并且它里面的所有东西都应该显示得很好。 because when I am trying with viewpager
and Fragments
its content is not visible因为当我尝试使用viewpager
和Fragments
它的内容不可见
Try adding this piece of code before loading your viewPager
在加载your viewPager
之前尝试添加这段代码
NestedScrollView scrollView = (NestedScrollView) findViewById (R.id.nest_scrollview);
scrollView.setFillViewport (true);
I needed to add android:fillViewport="true"
to the ScrollView
element.我需要将android:fillViewport="true"
到ScrollView
元素。
Let me know if it helped fix the issue.让我知道它是否有助于解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.