title: Parsing R.layout.* to integer value for usage in an inflater
body: <p>I'm trying to implement a way in which a layout id string is being given to the layout inflater instead of using it as and id integer, this is important since i want to be able to use a dynamically built id.</p>
  
  <p>i've tried using the getResources.getIdentifier method like so :</p>
  
  <pre><code>View view = inflater.inflate(getResources().getIdentifier("R.layout.coollayout", "layout", null),null);
  </code></pre>
  
  <p>however the getIdentifier() function keep returning 0 which in turn causing the app to crash, what am i missing here (and yes i'm sure i have a layout with that name)?</p>