Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waterfall? #4

Open
kosso opened this issue Nov 12, 2014 · 17 comments
Open

Waterfall? #4

kosso opened this issue Nov 12, 2014 · 17 comments
Assignees

Comments

@kosso
Copy link

kosso commented Nov 12, 2014

Nice work.

How hard would it be to add a pinterest-like 'Waterfall' Layout ability using this?

https://github.com/chiahsien/CHTCollectionViewWaterfallLayout

@mpociot
Copy link
Collaborator

mpociot commented Nov 12, 2014

Should be pretty easy to implement, once the main module is stable!

@kosso
Copy link
Author

kosso commented Nov 12, 2014

+1

@mpociot mpociot self-assigned this Nov 12, 2014
@justadaniel
Copy link

+1

@mpociot
Copy link
Collaborator

mpociot commented Jan 6, 2015

I think this might be a good Android counterpart https://github.com/etsy/AndroidStaggeredGrid

@mpociot
Copy link
Collaborator

mpociot commented Jan 12, 2015

iOS is now implemented in version 1.1.0

@viezel
Copy link
Contributor

viezel commented Jan 12, 2015

👍 very nice!

@kosso
Copy link
Author

kosso commented Jan 12, 2015

Cool! thanks!

@yozef
Copy link

yozef commented Jan 12, 2015

Just tested it out in simulator! played nicely :)

Works also with animations when adding an item:

// Insert Item in List View with Animation
var addItemBtn = Ti.UI.createButton({title:'Add Item', bottom: 5, width: 250, backgroundColor:'white', height: 50});
addItemBtn.addEventListener('click', function(e){
    fruitSection.insertItemsAt(
                                0, // At Index
                               [{  
                                   properties: {height:400,width:400, backgroundColor:'gray'}, // Properties of Main View
                                   // Bind properties to bindId in Template
                                   info: {text: 'Something', color:'white'}, 
                                   es_info: {text: 'Manzana'}, 
                                   pic: {image: 'http://www.noao.edu/image_gallery/images/d2/ngc2237_400.jpg'}
                                }], {animated:true, animationStyle: Titanium.UI.iPhone.RowAnimationStyle.LEFT});
});
win.add(addItemBtn);

and add the following to childTemplates:

childTemplates: [
        {                        
            type: 'Ti.UI.ImageView', // Use an image view for the image
            bindId: 'pic',           // Maps to a custom pic property of the item data
            properties: {            // Sets the image view  properties
                width: Ti.UI.FILL, height: Ti.UI.FILL,
            }
        }, ...

add about 100 items, and ... it Runs Smoothly 👍

@mpociot
Copy link
Collaborator

mpociot commented Jan 13, 2015

Thanks for testing this @yozef !

@AppWerft
Copy link

+1

@deckameron
Copy link

Hi @yozef,

I tried your solution on Android but it did not work!
The item gets inserted on the listView but it shows just a white square instead.
Did you experience this behaviour on your tests?

My best,

@yozef
Copy link

yozef commented Jan 29, 2015

@deckameron I just tried it on iOS

@deckameron
Copy link

@yozef Thanks! :)

@mpociot
Copy link
Collaborator

mpociot commented Jan 29, 2015

Hey @deckameron ,

the waterfall layout is not available for Android.
I'm working on it ;)

@IonRod
Copy link

IonRod commented Apr 17, 2015

@mpociot
Hi!
What about waterfall layout on Android? Maybe I could help you to implement it if you'l tell me what to do?

@nuno
Copy link
Owner

nuno commented Oct 8, 2016

@mpociot you never actually had the change to implement on Android, Im correct?

@nuno
Copy link
Owner

nuno commented Sep 29, 2017

It never was the change to implement on Android, sorry :(
I accept PR :)

@nuno nuno closed this as completed Sep 29, 2017
@nuno nuno reopened this Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants