bhaveshjabuvani88 / carouseleffect Goto Github PK
View Code? Open in Web Editor NEWCarousel Effect with ViewPager
Carousel Effect with ViewPager
I did this :
switch (adapterType)
{
case MainActivity.ADAPTER_TYPE_TOP:
Glide.with(context)
.load(listItems[position])
.into(imageCover);
linMain.setBackgroundResource(R.drawable.shadow);
break;
case MainActivity.ADAPTER_TYPE_BOTTOM:
Glide.with(context)
.load(listItems[position])
.applyDefaultRequestOptions(new RequestOptions().bitmapTransform(new BlurTransformation(20)))
.into(imageCover);
linMain.setBackgroundResource(0);
break;
}
I realised that its the same image view so the whole thing was being blurred. I made another Adapter inflating another imagview and blurred that, still the entire thing is being blurred. How do I just blur the back imageview???
I implement the code in fragments.
At first the flow and transitions work fine but when I open an internal fragment (instead of activity full screen) and then try to return to the carousel screen again, the back viewpager stops working well.
I check the indices and values in the onPageScrolled method and everything seems fine, but visually it seems that the order and sense of the transition is lost.
The CarouselEffectTransformer uses ViewCompat.setElevation() method to have current view pager item appear on both of its neighbors, but since elevation is not supported by Android below API 21 (Lollipop), pre-lollipop device don't have the desired effect.
How to fix this, any idea ?
05-02 17:14:16.451 21084-21200/com.app.snehalniti W/OpenGLRenderer: Layer exceeds max. dimensions supported by the GPU (818x16777215, max=8192x8192)
05-02 17:14:16.451 21084-21200/com.app.snehalniti W/OpenGLRenderer: Layer exceeds max. dimensions supported by the GPU (818x16777215, max=8192x8192)
05-02 17:14:16.452 21084-21200/com.app.snehalniti W/OpenGLRenderer: Layer exceeds max. dimensions supported by the GPU (818x16777215, max=8192x8192)
05-02 17:14:16.452 21084-21200/com.app.snehalniti W/OpenGLRenderer: Layer exceeds max. dimensions supported by the GPU (818x16777215, max=8192x8192)
05-02 17:14:16.452 21084-21200/com.app.snehalniti W/OpenGLRenderer: Layer exceeds max. dimensions supported by the GPU (818x16777215, max=8192x8192)
05-02 17:14:16.453 21084-21084/com.app.snehalniti W/JNIHelp: Discarding pending exception (java.lang.IllegalStateException: Unable to create layer for RelativeLayout @9b858a0) to throw java/lang/IllegalStateException
05-02 17:14:16.453 21084-21084/com.app.snehalniti W/JNIHelp: Discarding pending exception (java.lang.IllegalStateException: Unable to create layer for RelativeLayout @35a5ecc) to throw java/lang/IllegalStateException
05-02 17:14:16.453 21084-21084/com.app.snehalniti W/JNIHelp: Discarding pending exception (java.lang.IllegalStateException: Unable to create layer for RelativeLayout @5349bb8) to throw java/lang/IllegalStateException
05-02 17:14:16.453 21084-21084/com.app.snehalniti W/JNIHelp: Discarding pending exception (java.lang.IllegalStateException: Unable to create layer for RelativeLayout @6960f7) to throw java/lang/IllegalStateException
05-02 17:14:20.460 21084-21084/com.app.snehalniti W/GAv4: syncDispatchLocalHits timed out: java.util.concurrent.TimeoutException
05-02 17:14:20.611 21084-21084/com.app.snehalniti E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.snehalniti, PID: 21084
java.lang.IllegalStateException: Unable to create layer for RelativeLayout @d561a82
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:328)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:5896)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
hello sir , i have to set design image like some part of left images and some part of right images cover by center image, I means to say there is no gap b/w image but some portion is covered by center images
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.