title: Adding items to Strings Array in xml file programmatically
body: <p>in <strong><code>ActivityA</code></strong> I have a <code>ListView</code> and <strong><code>onItemClickListner</code></strong> so when I click on an item I need to save that item's title to view it in <strong><code>ActivityB</code></strong>'s <code>ListView</code> I succeed getting the clicked item's title what I need is how to send it to <strong><code>ActivityB</code></strong> or add it in a <strong><code>String-Array</code></strong> inside xml file without starting <strong><code>ActivityB</code></strong>.</p>
  
  <p>The <code>ListView</code> code in both activitys is the same</p>
  
  <p><code>ListView</code> Code :</p>
  
  <hr>
  
  <pre><code>class SingleRow
  {
  String title;
  String description;
  
  SingleRow(String title, String description)
  {
      this.title = title;
      this.description = description;
  }
  }
  class Adapter extends BaseAdapter {
  
  
  ArrayList&lt;SingleRow&gt; list;
  Context context;
  
  Adapter(Context c)
  {
      context = c;
      list = new ArrayList&lt;SingleRow&gt;();
      Resources res = c.getResources();
      String[] titles = res.getStringArray(R.array.lwastitles);
      String[] descriptions = res.getStringArray(R.array.laws);
  
      for(int i=0;i&lt;9;i++)
      {
          list.add(new SingleRow(titles[i],descriptions[i]));
      }
  }
  @Override
  public int getCount() {
      return list.size();
  }
  
  @Override
  public Object getItem(int i) {
      return list.get(i);
  }
  
  @Override
  public long getItemId(int i) {
      return i;
  }
  
  @Override
  public View getView(int i, View view, ViewGroup viewGroup) {
      LayoutInflater inflater= (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View row = inflater.inflate(R.layout.singlerow,viewGroup,false);
      TextView title = (TextView) row.findViewById(R.id.textView211);
      TextView description = (TextView) row.findViewById(R.id.textView112);
      title.setText(list.get(i).title);
      description.setText(list.get(i).description);
      return row;
  }
  
  
  }
  </code></pre>
  
  <hr>
  
  <p><strong><code>OnItemClickListner</code></strong> code:</p>
  
  <pre><code>public class Examples extends Activity {
  
  
  ListView list;
  @Override
  
  protected void onCreate(Bundle savedInstanceState) {
  
  
  
      super.onCreate(savedInstanceState);
       setContentView(R.layout.examplesandlaws);
  
          list = (ListView) findViewById(R.id.listView);
          list.setAdapter(new Adapter(this));
  
      list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int i, long l) {
  
          }
      });
  
  }
  }
  </code></pre>