title: In Android, can I have different activities use the same class file?
body: <p>I was wondering if it's possible in Android to declare different activities (say <code>.ActivityA</code> and <code>.ActivityB</code>) in AndroidManifest and use the same class file.</p>
  
  <p>Is this achievable somehow?</p>
  
  <p>One possible solution is a base class and then create other class files which inherit from that base class. But is there any other way than to have multiple class files?</p>
  
  <p>I mean, the code should be almost identical for both activities I need this for. A couple of <code>ifs</code> here and there might be needed depending on the activity being called though.</p>
  
  <p>How would you solve this problem?</p>
  
  <p><strong>[EDIT]</strong></p>
  
  <p>Judging by the responses I don't think I made myself clear enough, sorry about that. <strong>But I explicitly need to have different activities.</strong> Not a single one passing different values through Intents.</p>