felipecsl / AsymmetricGridView

Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span
http://felipecsl.com/AsymmetricGridView
MIT License
1.84k stars 431 forks source link

Displaying dynamic images in AsymmetricGridView #37

Closed bkjbkjbnkj687698698 closed 9 years ago

bkjbkjbnkj687698698 commented 9 years ago

In my project images are fetched from server.So i am getting url of images from server.I can store that in list but how to implement it with AsymmetricGridView. Seeing your tutorial i added this-

   mGridView=(AsymmetricGridView)rootView.findViewById(R.id.asymmetricgridView);
    mGridView.setRequestedColumnWidth(Utils.dpToPx(this, 120));
    final List<AsymmetricItem> items = new ArrayList<>();

    // initialize your items array
    adapter =new PhotosListAdapter();
    AsymmetricGridViewAdapter asymmetricAdapter =
            new AsymmetricGridViewAdapter<>(getActivity().getApplicationContext(), mGridView, adapter);
    mGridView.setAdapter(asymmetricAdapter);

Here PhotosListAdapter is the adapter which extends ListAdapter.Now how to pass urls to adapter.And how to display images from url in gridview?