Giter Club home page Giter Club logo

circularviewpager's People

Contributors

citux avatar tobiasbuchholz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

circularviewpager's Issues

Request: support non-support fragments

My project is mature and uses non-support fragments. Changing the code base to use support fragments is non-trivial. It would be neat if your library supported both types. :)

Crashes inside a Fragment

If using inside an Activity, works as expected.
If used inside a fragment, throws:

"java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 3, found: 5"

ViewPager current position not updating correctly

Update

I fixed half of my issue and made a second post (below). There's still a problem, but at least it's scrolling infinitely now

Original

I'm brand new to Android development, so forgive any terrible code or lack of understanding of simple concepts (like the difference between an Activity and a Fragment)

For my work I was asked to create a simple app with 3 screens that you could cycle between with a swipe, and on each of these screens we wanted a streaming video (same subject, different angles). Because Android supports OpenGL I know that in the worst-case scenario this is guaranteed to be possible by drawing all of the content to the screen myself, but Android had a lot of built-in UI components that seemed to make the job easier. Unfortunately I quickly learned that the ViewPager wouldn't meet my needs - as every solution online suggests you need at least 4 screens (I want 3) and their suggestion of having getCount() return Integer.MAX_VALUE means you can swipe right infinitely, but you still hit 0 if you swipe left.

Then I found this library - and the demo worked perfectly. I believe this will do everything I need. But when I tried to implement it in my project, I got the following behavior:

Load app: Displays screen A
Swipe left: Failed (hit the edge)
Swipe right: Displays screen A
Swipe right: Displays screen B
Swipe right: Displays screen C
Swipe right: Displays screen A
Swipe right: Failed (hit the edge)
Swipe left: Briefly displays screen C, then switches to screen B when the animation completes
Swipe left: Displays screen B again
Swipe left: Displays screen A
Swipe left: Displays screen C
Swipe left: Failed (hit the edge)

Here's a link to the repository where I temporarily uploaded my code (I've removed the license key for our Red5 streaming server from the code, so the video won't work -- but there's a red bar at the bottom of each screen which reads "test 1", "test 2", and "test 3" for each screen)

https://github.com/stevendesu/red5pro-tmp-repo

I'm not sure if I'm doing something wrong or if I found a bug in the library.

scrolling is not smooth

i have a grid view inside viewPagerFragment when i scrolling view pager it shine at the "end" of item. i mean at the first item or last item that repeated. i set view pager and grid view "overScrollMode="never" ",in xml and java code, but the problem not solved!

Scrolling issue

It do not scroll properly, when i am on last page, and swipe right, it sets item on first index instead of 0th index and vice versa.

How reinitialize this circularViewpager?

I tried to reinitialize like this

viewpager.setAdapter(new BranchCircularViewPagerAdapter(getApplicationContext(), getSupportFragmentManager(), temp)); final CircularViewPagerHandler circularViewPagerHandler = new CircularViewPagerHandler(viewpager); circularViewPagerHandler.setOnPageChangeListener(createOnPageChangeListener()); viewpager.addOnPageChangeListener(circularViewPagerHandler);

But it previous fragment is still there it wont remove..

set current item fixed to 1

Hi, and thanks for this library. I can't get setCurrentItem to work properly - the item I set is always off by one. The only way seems to be to use a "+1" when I invoke setCurrentItem, so for instance: if the user clicks on the item 0, I need to launch the pager and use setCurrentPager(1).
Is this somehow expected by the CircularViewPager? I see that in the CircularViewPagerHandler constructor, the current item is set at 1 by default and not at 0.
Thanks for any hint.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.