Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

当ViewPager宽度不等于屏幕宽度时,出现各子页面互相覆盖的问题。 #112

Open
FelixYanYongming opened this issue Sep 28, 2018 · 0 comments

Comments

@FelixYanYongming
Copy link

代码中凡是出现如下screenWidth的地方都不正确,ViewPager的宽度不一定与屏幕宽度相等。
当ViewPager宽度不等于屏幕宽度时,出现各子页面互相覆盖的问题。
int screenWidth = getContext().getResources().getDisplayMetrics().widthPixels;
这里不应该使用屏幕宽度,而是应该使用ViewPager自身的宽度。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant