Giter Club home page Giter Club logo

fancycoverflow's Introduction

Hi there ๐Ÿ‘‹

Check it out! โœจ It's me, David!

  • ๐Ÿค– 10+ years of professional Android development experience (including Kotlin & Compose).
  • ๐Ÿ“ฒ Developed and launched dozens of Android apps and libraries.
  • ๐Ÿ•น๏ธ 3 years of professional Unity game development.
  • โšก Skill-drop! Coding (C#, Java, Kotlin), leading teams (multi-year experience in different markets), collaboration (GitHub, Git, Discord, Slack, Google Workspace, Notion), build systems & CI (scripting, Gradle, GitHub Actions, Buildkite, Jenkins), cloud & services (AWS, Google Cloud, serverless), 3D printing, coffee drinking.
  • ๐Ÿ˜„ My pronouns are he/him.

Contact me ๐Ÿ“ซ

You can reach out to me via any of the channels below, which I regularly check!

fancycoverflow's People

Contributors

davidschreiber 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

fancycoverflow's Issues

Custom View Group using Fragments

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,

@OverRide

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

Coverflow improvement

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 ?

StackOverflowError

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

Hey David

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.

Coverflow presentation problem in landscape mode

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:

  1. can I solve the above problem using this.setSpacing(x);
  2. Or Is there any efficient way to reduce space between covers

Add to Maven Central.

I guess this library should be uploaded to Maven Central so that it gets easy for Android Studio developers to import it.

Amplification of Items' size & Decrease of Distances among items

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?

Custom item effects should be realizable

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.

Scroll Speed

Is there any way to control the scroll speed?
When i move my finger over der Screen, the menu moves too fast.

Thanks david!

Excessive calls to getChildStaticTransformation

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

Items not scrolling

Adding a click listener on the coverflow items disables/intercepts the scroll event. Then the onclick action works. What could i be missing?

Scrolling is not Woking while custom adapter are used

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?

Are those scenarios available

1.Detect image click
2.Detect image long press
3.Detect top left corner click
4.Minimize the space between images

Move next and previous using buttons

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.

Height and width change according to devices

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.

Use of negative setSpacing causes selection issues

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

How to get current position from fancycoverflow?

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.

How to change default image position to display

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!!

lollipop weird behavior

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?

Use multiple views as coverflow item

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>

Change number of children visible

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.

Circular

Hi , How can we make this overflow circular or infinite.

Callback Events

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.

setSelection with animation

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

OOM Occurs..

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...

SwipeRefresh

Hi guys ;
it's possible use SwipeRefresh in this Widget?

Images with transparency cumulates opacity

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...

762739378849275screenshot_2014-08-28-10-43-30
762809429496266screenshot_2014-08-28-10-46-45

Any thoughts on this would be helpful !

Thanks,

Julien

not working while loading image from Url

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.

not Scrolling over the buttons

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.

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.