title: Where to put PNG files and how to refer to them from ImageView in XML layout?
body: <p>After reading 2 books on Android programming, I am trying to port an iOS Word game app:</p>
  
  <p><img src="https://i.stack.imgur.com/JpA4N.png" alt="word game screenshot"></p>
  
  <p>I would like to have 2 classes inheriting from <code>View</code> - <a href="https://github.com/afarber/android-newbie/blob/master/DragAndDraw/src/de/afarber/draganddraw/SmallTile.java" rel="noreferrer">SmallTile.java</a> and <a href="https://github.com/afarber/android-newbie/blob/master/DragAndDraw/src/de/afarber/draganddraw/BigTile.java" rel="noreferrer">BigTile.java</a>.</p>
  
  <p>Both classes should be composed of an <code>ImageView</code> (id: "image") and 2 <code>TextViews</code> (ids: "letter" and "value").</p>
  
  <p>The difference between them is that BigTile will be draggable and its "image" has a shadow.</p>
  
  <p>I have put the graphical assets into the directory <a href="https://github.com/afarber/android-newbie/tree/master/DragAndDraw/res/drawable-mdpi" rel="noreferrer">res/drawable-mdpi</a> and I am trying to refer to them from the layout files <a href="https://github.com/afarber/android-newbie/blob/master/DragAndDraw/res/layout/small_tile.xml" rel="noreferrer">res/layout/small_tile.xml</a> and <a href="https://github.com/afarber/android-newbie/blob/master/DragAndDraw/res/layout/big_tile.xml" rel="noreferrer">res/layout/big_tile.xml</a> as:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ImageView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/image"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:src="@drawable/small_tile.png" &gt;
  &lt;/ImageView&gt;
  </code></pre>
  
  <p>But I get the error </p>
  
  <blockquote>
    <p>No resource found that matches the given name
    (at 'src' with value '@drawable/small_tile.png')</p>
  </blockquote>
  
  <p>as you can see in the Eclipse-screenshot (here <a href="https://i.stack.imgur.com/I0cQG.png" rel="noreferrer">fullscreen</a>):</p>
  
  <p><img src="https://i.stack.imgur.com/I0cQG.png" alt="eclipse screenshot"></p>
  
  <p>I have tried other paths for my assets as well - for example <code>res/drawables</code> and <code>src/assets</code>.</p>
  
  <p>Also another question: how to load the layout files from a <code>View</code>?</p>
  
  <p>There is only an <code>ImageView</code> in the <a href="https://github.com/afarber/android-newbie/blob/master/DragAndDraw/res/layout/small_tile.xml" rel="noreferrer">res/layout/small_tile.xml</a> right now, but I'd like to add the two <code>TextView</code>s there too (for the letter and its numerical value) - and then load it from the <a href="https://github.com/afarber/android-newbie/blob/master/DragAndDraw/src/de/afarber/draganddraw/SmallTile.java" rel="noreferrer">SmallTile.java</a>.</p>
  
  <p>From the programming books I know how to load a layout from <code>Activity</code> or <code>Fragment</code> - call <code>setContentView(R.layout.activity_main);</code> in <code>onCreate</code> - but where and what to call in a <code>View</code> class?</p>