![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android简单应用
范范丶
!!!!
展开
-
解决AndroidStudio创建项目报Conflict with dependency 'com.android.support:support-annotations' in project的错
Android Studio3.0.1创建了一个新项目,直接报错 Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved ...原创 2019-05-07 11:22:34 · 281 阅读 · 0 评论 -
ViewPager中有超过两个Fragment后,切换时Fragment会重走onCreateView导致页面重新加载
当ViewPager中添加三个以上的Fragment相互切换时,不是相邻的Fragment会重走onCreateView,这样页面会重新加载。 ViewPager默认是会保留当前页的前一页和后一页,也就是到了第三页的时候,第一页已经被销毁了,回到第二页的时候会重新创建 ViewPager中的setOffscreenPageLimit(int limit)方法就是用来设置保留当前页前多少页和后多...原创 2019-05-24 11:09:22 · 2369 阅读 · 1 评论