title: Generalized Android Activity
body: <p>I am new to Android programming. My question is that i have a list (ListView) of 8 restaurant headings. Upon clicking of any of these, a new page (activity) would start containing the menu and details of the restaurant. I understand that implementing 8 activities would be wasteful so probably i will have a general restaurant detail activity.</p>
  
  <p>Now i am figuring out how to display this information out in an efficient way. I have so far implemented this which helps me to send a message across to the other activity according to the restaurant selected. But how can i send big chunks of information:</p>
  
  <p><strong>----MainActivity.java------</strong></p>
  
  <pre><code>String [] restaurants = {"abc","def"....};
  int POSITION_ACT;           
  
  list.setOnItemClickListener(new AdapterView.OnItemClickListener(){
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id){
              POSITION_ACT=position;
              customActivity(view);
             }
      });
  
  public void customActivity(View view) {
  
      Intent intent = new Intent(this, RestaurantDetails.class);
      intent.putExtra(MESSAGE, "You clicked this restaurant: " + restaurants[POSITION_ACT]);
  
      startActivity(intent);
  }
  </code></pre>
  
  <p><strong>--generalrestaurant.java----</strong></p>
  
  <pre><code>    Intent intent = getIntent();
      String msg = intent.getStringExtra(foodActivity.MESSAGE);
      TextView tt1 = (TextView) findViewById(R.id.tt1);
  
      tt1.setText(msg);
  </code></pre>