title: Android Dynamic Class creation gives java.lang.InstantiationException
body: <p>When I am trying to create a dynamic instance of Android UI Component, it gives me "java.lang.InstantiationException".</p>
  
  <p><strong>Sample Code:</strong></p>
  
  <pre><code>Class components[] = {TextView.class, Button.class,...}
  Component mControl = null;
  ...
  ...
  mControl = (Component) components[nIndexOfControl].newInstance();
  </code></pre>
  
  <p>Can some one guide me, what is the best way to achieve the above as I want to save if..else for each widget?</p>