Coder Social home page Coder Social logo

ecogallery's People

Contributors

mnowrot 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

ecogallery's Issues

Selected state is cleared for selected item

When I use a selector like the following for gallery items I observe the following issue:

Sometimes selected item gets highlighted (as it should) and immediately after that the highlighting is gone. It usually happens with the first item in the gallery.

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_selected="true">
        <shape>
            <solid android:color="#F14A1D"/>
        </shape>
    </item>
    <item>
        <shape>
            <solid android:color="@android:color/transparent"/>
        </shape>
    </item>
</selector>

I guess the issue is caused by improper handling of selected state for gallery items.

I had a look in the code and I think the error is in the EcoGallery.updateSelectedItemMetadata method. The gallery should not unfocus the old child if the old and the new children are the same. I.e. instead of

if (oldSelectedChild != null)

the condition should be

if (oldSelectedChild != null && oldSelectedChild != mSelectedChild)

Could you please verify mu guess?

Custom child drawing

Hi,
wonderful library.
I need to push up centering items while scrolling, proportionally to center distance. I'm searching for a method to override childrend drawing to do that, how can I achieve this goal?

Thx in advance

setOnClickListener disable the "swipe"

i have tried making a key listener and now i cant "swipe" between the images - what is the problem ?

imageView.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {

                        if (lvl==1)
                        {
                          Intent myIntent = new Intent(MainActivity.this, Easy.class);
                     startActivity(myIntent);
                        }



                    }
                }); 

Can not swipe on image when add onClickListenner

Hi Feras Alnatsheh,

This is a wonderful gallery.
But when I add onClickListenner to imageView (MyActivity -> getView )
It can not scroll when I swipe on the image.
Please help me for this bug and make this gallery more perfect.

Thanks and best regards,
Frank
cannot_scroll

        imageView.setImageResource(resId);

        // Add on click listener
        imageView.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                Log.v("MyActivity", "onClicked");
            }
        });
        // End

        return imageView;

Not found any tutorial for how to use it.

Hi falnatsheh,

first of all thank you for your contribution for Android.
i want to know is there any tutorial for how to use it.
i have searched a lot on Google but unable to found "How to use EcoGallery in android".
it would be better for us if you add a Demo(Example/Tutorial) also with this library.

Regards,
Deepak Swami

Action on changed active image

I can anybody help me with this:

I want to change a labeltext if the active EcoGalleryitem changed.
Don't know how to start..

getView() in BaseAdapter being called infinitely

I have some basic getView() code that is as follows:

public View getView(int position, View convertView, ViewGroup viewGroup) {
View v = inflater.inflate(R.layout.gallery_image_layout, null);
ImageView i = (ImageView) v.findViewById(R.id.houseImage);
i.setLayoutParams(new FrameLayout.LayoutParams(pictureWidth,
FrameLayout.LayoutParams.MATCH_PARENT));
FrameLayout layout = (FrameLayout) v
.findViewById(R.id.rootFrameLayout);
layout.setLayoutParams(new EcoGallery.LayoutParams(pictureWidth,
EcoGallery.LayoutParams.MATCH_PARENT));
House h = getItem(position);
AQuery aq = new AQuery(mContext);
aq.id(i).image(h.thumbnailURL, true, true, pictureWidth, 0);
return v;
}

When using AQuery it seems to never stop calling getView() and the gallery is blank with nothing there. Changing the two lines out to a simple ImageView.setImageResource() fixes it.

Any idea what's going on?

Failed to find style 'ecoGalleryStyle' in current theme

Dear Feras,

after introducing the EcoGallery to my project, the following information/warning started to be shown in the GraphicalLayout of the fragment in which I'm using your library:

Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout,
or fix the theme style references.

Failed to find style 'ecoGalleryStyle' in current theme

Is there something additional I should do to make this warning disappear?

Best Regards,

Marcin

Items Sometimes Snap To Center while Scrolling

I have the EcoGallery working with my adapter and 20 items of data with my custom view (which is a large view, mainly an ImageView). They show and scroll great for most of the list. However, near the center of the list, specifically 9 thru 11 (out of my 20), the items will continuously snap the selected item back to the center. You can literally touch, and drag continuously left or right, and it will continue to snap back every 0.25-0.5 second or so, without picking up your finger. The only way to make it past these items is to fling generously to quickly bypass the item.

Does anyone have ideas on why this could be happening and potentially any solutions to provide consistent scrolling across the entire list?

Focus is Lost when using Arrow Keys

If you use the Arrow Keys to navigate through the gallery. The focus is lost and jumps outside of the Gallery. Focus should stay on Gallery or on the Child within the gallery.

java.lang.NullPointerException: when fast scroll

When fast scroll,this bug happened

java.lang.NullPointerException: Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16204)
at android.view.View.updateDisplayListIfDirty(View.java:15198)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:282)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:288)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:323)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2642)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2461)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2094)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6045)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860)
at android.view.Choreographer.doCallbacks(Choreographer.java:672)
at android.view.Choreographer.doFrame(Choreographer.java:608)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)

I can't scroll EcoGallery with Views which are clickable like Buttons ...

Hello,
I want to use the EcoGallery like a horizontal ListView with locking centre. My BaseAdapter holds a lot of Buttons which are match_parent in height and width. An OnClickListener is set for any Button.
Now the problem is that the EcoGallery is not scrollable.

For the old Gallery a similar problem existed but was solved very well. Please see:
http://stackoverflow.com/questions/8127828/scrolling-a-gallery-with-buttons

Can you extend the EcoGallery for one setter-methode which makes the EcoGallery scrollable in this case?

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.