Comments (4)
You could use a default LayoutManager
like LinearLayoutManager
to see if it still needs twice swipe. If it does then it's nothing to do with VPLM
. If it does not, then try not to use CenterSnapHelper
and check it again. Cause it works fine in my demo, I need you to narrow the possible to help me locating the issue.
from viewpagerlayoutmanager.
I found the issue was caused by the following code in my BaseActivity. I use that to keep the navigation bar hidden all the time. That's because this is a kiosk-like application and the navigation bar does not need to be seen.
final View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
decorView.setSystemUiVisibility(uiOptions);
//Set a system bar visibility change listener
decorView.setOnSystemUiVisibilityChangeListener(
new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int visibility) {
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
decorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
}
}
}
);
When I remove this code, the swipe works fine.
from viewpagerlayoutmanager.
see Using Immersive Full-Screen Mode
final View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_IMMERSIVE | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
decorView.setSystemUiVisibility(uiOptions);
from viewpagerlayoutmanager.
Thanks.
from viewpagerlayoutmanager.
Related Issues (20)
- 滑动到指定位置
- ViewPagerLayoutManager.mOrientation覆盖了父类的LinearLayoutManager.mOrientation
- 能实现每个iten的顶部都是水平的吗
- 如何基于CircleLayoutManager实现椭圆圆弧的效果呢 HOT 4
- How to stop auto scrolling? HOT 1
- ScaleLayoutManager第一次滑动的时候会导致recycleview子布局重现排版
- 如何一次只滑动一个item? HOT 2
- AutoPlayRecyclerView
- 显示多个item时 放大的item左右间距 跟其他item左右间距不一样 - ScaleLayoutManager
- 大于3个item时 放大的item左右间距与其他item左右间距不一样 - ScaleLayoutManager HOT 1
- good job!
- when items are only 3 then why it's scrolls and hide until first visible items rich to end
- 滑动到指定位置调用次数过多会卡死
- LeakCanary内存泄漏
- Big performance issue HOT 1
- CircleScaleLayoutManager
- Infinite status unavailable
- 有iOS的??
- 像小说阅读器那种仿真翻页能实现吗
- 使用PageSnapHelper并没有单页滑动
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viewpagerlayoutmanager.