applm / carouselwidget Goto Github PK
View Code? Open in Web Editor NEWCarousel displaying list of items with selected item in the middle
License: Other
Carousel displaying list of items with selected item in the middle
License: Other
Is there any way to move selected view on center point? I hope I will get solution from your side ASAP.
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.
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?
Can you please tell me if there is a way to add circular page indicator
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
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.
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?
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
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)
Can you add an Apache 2 license so this library can be used in other projects?
How it's possible to change scroll direction from right to left?
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.
I am using this for displaying 3 images and the speed of scrolling is too high and we wish to slow it down, i tried many attributes and played with them but not working as needed.
Can you kindly help in this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.