An adapter for GridView with 2 type of view (android) -


I want to create an adapter for Gridview, in which 2 types of view encoding are in the position of the item first item for grid 1 One view of the column and 2 should be in the second view of the column. I do not know whether I should customize the grid view or just put it in the adapter. This is an example of the result that I want I want to see one example

Please need your help

This is probably the answer you want to hear, but the easiest way to do this is to use ListView instead of GridView you have 2 different W To complete this, create a new adapter which extends one of the list adapters classes, the standard < Use code> ListView conventions. Overvride getView (int, view, view graph) so that it returns the correct view based on the situation (first argument), and then it will return the correct view for each item in your list. You have to manage the relationship between the entries in the list and whether it is wide or normal, but it should not be too much a deal.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -