title: android how to create my own Activity and extend it?
body: <p>I need to create a base class that extends <code>Activity</code> which does some common tasks in my application and extend my <strong>activities</strong> from it,in the following form:</p>
  
  <p><strong><em>public BaseActivity extends Activity{....}</em></strong></p>
  
  <p><strong><em>public SubActivity extends BaseActivity{...}</em></strong></p>
  
  <p>in <strong>SubActivity</strong> I need to give values to some variables and UI components defined in <strong>BaseActivity</strong>, I may need to define a different layout for <strong>SubActivity</strong> according to some flag value,  also(in <strong>SubActivity</strong> ) I want to execute asyncTask that is defined in <strong>BaseActivity</strong>.</p>
  
  <p>is this possible? if yes, is there any tutorial that may help?
  thank you in advance</p>