title: Image ordering in Android studio
body: <p>I am trying to figure out an ordering of images in Android studio, as I am primarly iOS developer and Android is new to me. </p>
  
  <p>I have simple app, which shows list of values, names, text attached to them. The text seem to be attached to the right names, however the pictures are completely mixed, not attached properly. Pictures are in folders in assets. I also tried to reorder them as "hard-coded" by naming them with numbers, which doesnt work.</p>
  
  <p>I've noticed this piece of code, how ever Im not sure how to order, attach the pictures properly.</p>
  
  <pre><code>private String getImagePath(int position) {
      String path = null;
      AssetManager assetManager = getAssets();
      try {
          String[] imageNames = assetManager.list(foodType.getName(this));
  
          path = foodType.getName(this) + "/" + imageNames[position];
  
      } catch (IOException e) {
          e.printStackTrace();
      }
  
      return path;
  }
  </code></pre>