Project

General

Profile

« Previous | Next » 

Revision ff4a2a13

Added by Leszek Koltunski 4 months ago

progress with new sorting methods.

View differences:

src/main/java/org/distorted/helpers/ObjectGridCreator.java
235 235
      }
236 236

  
237 237
    LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
238
    int obj = 0;
238 239

  
239 240
    for(int object : objects)
240 241
      {
241 242
      View v = createView(act,layoutInflater,object,mPadding );
242
      int row = object/colCount;
243
      int row = obj/colCount;
244
      obj++;
245
      GridLayout.Spec rs = rowSpecs[row];
246
      GridLayout.Spec cs = colSpecs[nextInRow[row]];
243 247

  
244
      GridLayout.LayoutParams params = new GridLayout.LayoutParams(rowSpecs[row],colSpecs[nextInRow[row]]);
248
      GridLayout.LayoutParams params = new GridLayout.LayoutParams(rs,cs);
245 249
      params.bottomMargin = mMargin;
246 250
      params.topMargin    = mMargin;
247 251
      params.leftMargin   = mMargin;

Also available in: Unified diff