My code construction is like this:
-->MainActivity
MainActivity
'-> Fragment
'-> WebView
'-> Button
'-> ViewPager
'-> ChildFragment
'-> SwitchButton
The button is used to change the visibility of the WebView view. My problem is that when the webView visibility is changed to GONE, the state of the SwitchButton inside the viewPager changes to the default state which is OFF.
您可以使用接口从ChildFragment->适配器进行通信
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.