title: Nested inner Activity class in android
body: <p>Is declaring a class that extends Activity inside another Activity class possible? If it is, how would I register that class in the manifest? Also, is that something that can be reasonably done or is it a bad idea?</p>
  
  <p>I was thinking of something like</p>
  
  <pre><code>class ListClass extends ListActivity{
  
      ...
      ArrayList items;
  
      class ItemClass extends Activity{
  
          ...
          Item item;
  
          @Override
          onCreate(){
              Integer pos = getIntent().getExtras().getInt("pos");
              item = items.get(pos);
          }
      }
  
      @Override
      onItemClick(int position){
  
          startActivity(new Intent(this, ItemClass.class).putExtra("pos", position));
  
      }
  }
  </code></pre>
  
  <p>Note the syntax isn't 100% correct obviously, mostly pseudocode.</p>