davidschreiber / fancycoverflow Goto Github PK
View Code? Open in Web Editor NEWA cool Open Source CoverFlow view for Android with several fancy effects.
Home Page: http://davidschreiber.github.io/FancyCoverFlow/
License: Other
A cool Open Source CoverFlow view for Android with several fancy effects.
Home Page: http://davidschreiber.github.io/FancyCoverFlow/
License: Other
if setOnClick Event is applied to image or view coverflow freezes
Is it possible to inflate a whole layout consisting of several views as a single coverflow item and set that layout in XML?
It would be nice to see such an example.
This is the view I wish to have as a single coverflow item.
Help appreciated!
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<ImageView
android:id="@+id/positionViewIv"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="fitCenter"
android:src="@drawable/red_0"
android:layout_centerInParent="true"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_centerInParent="true">
<TextView
android:id="@+id/positionViewTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="BALANCE"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="SUMMARY"/>
</LinearLayout>
I have added a Log.e line into the getChildStsticTransformation and noticed that this routine is called continuously, many times a second, never stopping. Not exactly a loop as the App remains responsive, but obviously this would be a significant drain on device resources. I have found that the problem is resolved by commenting out the following:
if (android.os.Build.VERSION.SDK_INT >= 16) {
// item.invalidate();
}
I am running on builds > 16 and yet I notice no visual difference after commenting as above. I do not use reflection. What exactly is the need for this additional invalidate?
Regards
Roy
Is it possible to make this coverflow four directional I mean now I can swipe from right to left but what about from top and bottom ?
Is there any way to control the scroll speed?
When i move my finger over der Screen, the menu moves too fast.
Thanks david!
I am trying to use a custom view group with cover flow. Instead of an XML layout or view , I am trying to load the view from fragment transaction. Here is the code I am trying to use here,
public View getCoverFlowItem(int i, View reuseableView, ViewGroup viewGroup) {
CustomViewGroup fancyView = null;
if (reuseableView != null) {
fancyView = (CustomViewGroup) reuseableView;
} else
{
fancyView = new CustomViewGroup(context);
fancyView.getFrameLayout().setId(i+10000);
fancyView.setLayoutParams(new FancyCoverFlow.LayoutParams(750, ViewGroup.LayoutParams.WRAP_CONTENT));
}
FragmentManager fragmentManager = manager;
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(fancyView.getFrameLayout().getId(), ItemFragment.init(i));
fragmentTransaction.commit();
return fancyView;
}
class CustomViewGroup extends LinearLayout {
// =============================================================================
// Child views
// =============================================================================
private FrameLayout frameLayout;
// =============================================================================
// Constructor
// =============================================================================
private CustomViewGroup(Context context) {
super(context);
this.setOrientation(VERTICAL);
this.frameLayout = new FrameLayout(context);
LinearLayout.LayoutParams layoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
this.frameLayout.setLayoutParams(layoutParams);
this.addView(this.frameLayout);
}
// =============================================================================
// Getters
// =============================================================================
private FrameLayout getFrameLayout() {
return frameLayout;
}
}
For me the issue is the getView function is getting called infinite number of times for value i=0. But If I don't commit a fragment transaction it works normal(ie getting called only once for index 0)
Any clue on whats happening here?
Thanks
Hey,
First of all thanks to developer to develop this awesome library.
I'm facing some problem in presenting coverflow in landscape mode. In default spacing [ this.setSpacing(0); ] covers showing with long distance. So, maximum 3 covers showing in landscape mode. But I wanna show at least five covers. So, I set a dynamic negative value [ this.setSpacing(x); here 'x' is a dynamic negative value depends on display size. i.e: -300 ] to reduce spacing between covers. Its showing 5 covers perfectly but having some problem in swiping or selecting cover. I cant swipe left/right to immediate item, its forcefully transfers 2-3 items at once while swipe or select next/previous item.
So, my question is:
How can I change the number of children visible? I would like the centre item to be displayed much larger and only show 1 child left and 1 child right.
Thanks for your help and the great library.
Is there a way to use CursorAdapter with FancyCoverFlow?
We should add an extra spacing attribute that uses 'string' type or something similar.
1.Detect image click
2.Detect image long press
3.Detect top left corner click
4.Minimize the space between images
Hi,
Thanks for the source code, I am using it in my project to load image from url but facing problem it only show the center image not the right and left image. please help.
Library have some warning due to using deprecated API and import issue.
Please help on above issue.
Thanks,
Prashant
Hi,
First let me thank for this great library !
I have a shadow in my coverflow images (directly integrated to the ImageView).
The problem is that exactly when the selected item change it looks like the image is composited with itself cumulating the shadow and thus reducing the transparency...
Any thoughts on this would be helpful !
Thanks,
Julien
i am a chinese people,when getChildStaticTransformation(View child, Transformation t) do child invalidate will Overlap Wallpaper.you can use The gradient image do a test,will see my problem. i want to konw how to resolve this problem.
Hi,
I'm using a negative spacing (coverFlow.setSpacing(-200)) to achieve a certain look.
This works but creates item selection issues. For example if you touch the first item to the left it acts like if the second item was touched even if visually they don't overlap.
Is setSpacing the right way to reduce space between items ?
Thanks,
Julien
Can I implement your library using gradle dependency in android studio.
Hello David,
I'm using this fancy cover flow in one of my projects at work, and find out a weird behavior, that maybe you can help me.
On Lollipop android version the fancy coverflow disapears with the selected item when the device is blocked and brought back again to the application.
Have any ideas?
It's a very nice libray..
but when I use it and try to make the item not noly just ImageView...and then play it over and over..OOM Will Occurs...
for help...
Hello David,
Thanks for the awesome library. Are there any callback events provided by this library to know whether the coverflow is scrolling or it has just stopped scrolling. It would be great help if i can get callback events for the same. Thanks in advance.
Adding a click listener on the coverflow items disables/intercepts the scroll event. Then the onclick action works. What could i be missing?
I guess this library should be uploaded to Maven Central so that it gets easy for Android Studio developers to import it.
My Friend you did awesome work,it's really appreciating.
I'm using it for layout transition but having memory issue like too much work in main thread,could you please suggest me If there is any solution to come out from this problem.
Hello,
I started using this library and I'm having some trouble in understanding how can I make the coverflow to go to specific item (and animate).
I was trying to force the click event on the item, but with no luck so far.
Is there an easy way to do this?
Thanks.
How can i use this one for tablet?? I want to change height and width of coverflow according to device change.
I ve tried to change accordingly but i did not get any success.
Thank you very much.
You have done an impressive job. Hope to see it being implemented in more projects.
when i set the setOnClickListener for image, it cause the conflict of click event? i is very important for me. Please help me.
Hi
I inflated an XML layout in adapter.
Now is I try to "slide" the covers nothing is happening if I am trying to do it touching the items. If I slide from outside everything is fine...
Thanks
Daniel
On the example of Reflection ViewGroupReflectionExample.java
,if you try to scroll over the cover by touching over the buttons it does'nt work as expected.
Hi, good library for this one but i have some issues, how can i get current position from this coverflow?. When i scroll to play with this, i need to get the center of child position. Please quick reply to this one.
Thanks in advance.
There is an annoying bug with images including drop shadows.
With this sample image for example :
https://dl.dropboxusercontent.com/s/da9c10jdtk4g0c0/98014_presentations-01.png
I used a vertical LinearLayout to contain an ImageView and a TextView.
Every time I scroll, the drop shadow of the image is like doubled, as if the Bitmap was drawn over the previous one at each call of the draw function.
I understand the problem but I can't find how to fix it.
Hi , How can we make this overflow circular or infinite.
This could be done via a effect value callback mechanism that provides interpolated coverflow values to the managed child views. They could register for these values and apply their own effects.
Hai,
While i am using the custom adapter at that time is works but while i am scrolling the view at that tiem it dosen't work. Scrolling is not done on the custom apapter view.
can you help me why is not working with the custom adapter?
Not find the repository, do you have any new link?
hi guys.
i use set selection(int,true) but in moving item animation don't be load. how can i use enable animation for setselection
This library is awesome. But I have problem with default image position to display. I have an array image[] imgArr. By default, it always show imgArr[0]. Would you tell me how to change it to imgArr[1] or other?
Many thanks!!
Hi guys ;
it's possible use SwipeRefresh in this Widget?
I got a StackoverflowError with Android 2.3.x but not with Android 4.x.
I do not have any idea whats the problem.
Stacktrace:
06-28 11:55:43.038: E/AndroidRuntime(30074): FATAL EXCEPTION: main
06-28 11:55:43.038: E/AndroidRuntime(30074): java.lang.StackOverflowError
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.widget.TextView.onDraw(TextView.java:3966)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6933)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at at.technikum.mti.fancycoverflow.FancyCoverFlowItemWrapper.dispatchDraw(FancyCoverFlowItemWrapper.java:200)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1380)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:7039)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.buildDrawingCache(View.java:6693)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.getDrawingCache(View.java:6481)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1571)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at com.slidingmenu.lib.CustomViewAbove.dispatchDraw(CustomViewAbove.java:831)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.widget.FrameLayout.draw(FrameLayout.java:357)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.View.draw(View.java:6936)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.widget.FrameLayout.draw(FrameLayout.java:357)
06-28 11:55:43.038: E/AndroidRuntime(30074): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1904)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewRoot.draw(ViewRoot.java:1527)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewRoot.performTraversals(ViewRoot.java:1263)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.os.Handler.dispatchMessage(Handler.java:99)
06-28 11:55:43.038: E/AndroidRuntime(30074): at android.os.Looper.loop(Looper.java:123
As the title said, how to amplify the size of items and how could I decrease the distance among items? And what does the actionDistance mean? At the same time, scrolling on image item of FancyCoverFlow wouldn't change the current shown item, does it a bug or a function drawback?
Could somebody answer me?
actionDistance has to be "auto" or current view will not display. the animation is also not working when actionDistance is not set to auto.
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.