Giter Site home page Giter Site logo

carouselwidget's People

Contributors

applm 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

Watchers

 avatar  avatar  avatar

carouselwidget's Issues

set view on Center Point

Is there any way to move selected view on center point? I hope I will get solution from your side ASAP.

Views are too small

I noticed that even though the carousel is set to match parent, the view doesn't take up the entire screen space is confined to the middle of the screen and set height and width. Is there a way to reszie the carousel to actually fit the screen's width and height? Rather than the small space it currently contains? I noticed that in the sample app, this is done as well.

carousel-widget take more than 50% cpu usage.

Hello,

Actually I have integrate this library in my project but my issue is when i start scrolling from 0 To end at that time if I watch CPU usage it will take more than 50% .

If I am at first and last position and then If I watch CPU usage then its working fine for first and last position.

Is there any way to reduce CPU usage?

Where is the reflection feature?

Even after changing mReflectionCacheInvalid to true from CoverFlowCarousel.class there is no single item that shows reflection unlike the old Carousel.

image

Vertical Carousel

Hi, I am trying to convert your carousel to a vertical one. I am newish in Android and I kind of got lost in your code. Can you tell me where the views are getting created and how they get to be horizontal and not vertical?

Thanks

Refreshing Adapter

hi Martin

you have done a great job for the new beginner for the android , i have a issue to refresh the adapter how can i possible??

i have create a own layout for the CarouselWidget coverflow and integrate it will work perfectly but when i remove the item from that view it will not refresh please help me.

i have also try notifyDataSetChanged() of the adapter but unfortunately it will not work.

Thanks.

How to implement scroll snap point effect?

When user stop scrolling and MotionEvent.ACTION_UP is called in Carousel selected item should move to center point (Scroll snap point), is there any way or suggestionfor this functionality?

getting error

07-03 23:45:06.766: E/AndroidRuntime(970): FATAL EXCEPTION: main
07-03 23:45:06.766: E/AndroidRuntime(970): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.carouselapp/com.example.carouselapp.MainActivity}: android.view.InflateException: Binary XML file line #19: Error inflating class android.support.v7.internal.widget.NativeActionModeAwareLayout
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.ActivityThread.access$600(ActivityThread.java:130)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.os.Handler.dispatchMessage(Handler.java:99)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.os.Looper.loop(Looper.java:137)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-03 23:45:06.766: E/AndroidRuntime(970): at java.lang.reflect.Method.invokeNative(Native Method)
07-03 23:45:06.766: E/AndroidRuntime(970): at java.lang.reflect.Method.invoke(Method.java:511)
07-03 23:45:06.766: E/AndroidRuntime(970): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-03 23:45:06.766: E/AndroidRuntime(970): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-03 23:45:06.766: E/AndroidRuntime(970): at dalvik.system.NativeStart.main(Native Method)
07-03 23:45:06.766: E/AndroidRuntime(970): Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class android.support.v7.internal.widget.NativeActionModeAwareLayout
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:805)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:299)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
07-03 23:45:06.766: E/AndroidRuntime(970): at com.example.carouselapp.MainActivity.onCreate(MainActivity.java:23)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.Activity.performCreate(Activity.java:5008)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
07-03 23:45:06.766: E/AndroidRuntime(970): ... 11 more
07-03 23:45:06.766: E/AndroidRuntime(970): Caused by: java.lang.ClassNotFoundException: android.support.v7.internal.widget.NativeActionModeAwareLayout
07-03 23:45:06.766: E/AndroidRuntime(970): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
07-03 23:45:06.766: E/AndroidRuntime(970): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-03 23:45:06.766: E/AndroidRuntime(970): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.createView(LayoutInflater.java:552)
07-03 23:45:06.766: E/AndroidRuntime(970): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
07-03 23:45:06.766: E/AndroidRuntime(970): ... 24 more
07-03 23:50:06.877: I/Process(970): Sending signal. PID: 970 SIG: 9

Crash after clicking add view

I was trying the demo in your library, and clicked the "Add View" button then scrolled to the right, the app crashed while scrolling, below is the exception

06-21 10:15:21.736 3328-3328/com.appl.carouselwidget E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.appl.carouselwidget, PID: 3328
java.lang.ClassCastException: com.appl.carouselwidget.MainActivity$MyFrame cannot be cast to com.appl.library.CoverFlowCarousel$CoverFrame
at com.appl.library.CoverFlowCarousel.getViewFromAdapter(CoverFlowCarousel.java:129)
at com.appl.library.Carousel.refillRightToLeft(Carousel.java:398)
at com.appl.library.Carousel.refill(Carousel.java:372)
at com.appl.library.Carousel.computeScroll(Carousel.java:179)
at com.appl.library.CoverFlowCarousel.computeScroll(CoverFlowCarousel.java:116)
at android.view.View.updateDisplayListIfDirty(View.java:14035)
at android.view.View.getDisplayList(View.java:14071)
at android.view.View.draw(View.java:14838)
at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
at android.view.View.updateDisplayListIfDirty(View.java:14043)
at android.view.View.getDisplayList(View.java:14071)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3388)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3367)
at android.view.View.updateDisplayListIfDirty(View.java:14008)
at android.view.View.getDisplayList(View.java:14071)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3388)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3367)
at android.view.View.updateDisplayListIfDirty(View.java:14008)
at android.view.View.getDisplayList(View.java:14071)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3388)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3367)
at android.view.View.updateDisplayListIfDirty(View.java:14008)
at android.view.View.getDisplayList(View.java:14071)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3388)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3367)
at android.view.View.updateDisplayListIfDirty(View.java:14008)
at android.view.View.getDisplayList(View.java:14071)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3388)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3367)
at android.view.View.updateDisplayListIfDirty(View.java:14008)
at android.view.View.getDisplayList(View.java:14071)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:266)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:272)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:311)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2492)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2337)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1968)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

License

Can you add an Apache 2 license so this library can be used in other projects?

scrolling to clicked item is not proper

Assuming items in coverflow are 8, now 1st item is the center item so if i click directly 7th item scrolling is happening and it is stopping to 6th item and it's showing 6th item in middle but expected to be stopped at 7th item where 7th item should come in center.

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.