title: How to deal with multiple tabs, EditText and save to database?
body: <p>I am creating a Cash Sales app where I will implement 4 tabs. From 1st tab user will select customer from customer list, 2nd tab to select item from item list, 3rd tab to set payment details in 7 <code>EditText</code>'s and 4th to view draft and confirm to save in SQLite. I have couple of questions on it:</p>
  
  <ol>
  <li><p>For tab, should I create a tab container first by extending <code>FragmentActivity</code> like following:</p>
  
  <pre><code>public class CashSales extends FragmentActivity {
  
      private FragmentTabHost mTabHost;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.cash_sales_tab);
          mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);
          mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
  
          mTabHost.addTab(mTabHost.newTabSpec("customer").setIndicator("customer"),
                  CustomerSelect.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("item").setIndicator("item"),
                  ItemSelect.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("payment").setIndicator("payment"),
                  SetPayment.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("payment").setIndicator("payment"),
                  DraftViewAndSave.class, null);
      }
  }
  </code></pre></li>
  <li><p>Should I create different classes for each of the activities like <code>CustomerSelect</code>, <code>ItemSelect</code> etc? If need to create different classes should it be extended from <code>Fragment</code> class or <code>FragmentActivity</code> class? </p></li>
  <li><p>How can I memorize the data when user will go from 1st tab to 2nd tab? Should I use Session and finally save data from session to database?</p></li>
  </ol>
  
  <p>Guys I am new in Android. Please help me on this or send any sample link.</p>