title: String Array: Displaying Results
body: <p>I was thinking that I could take in the user inputs which I get from the two <code>AutoCompleteTextView</code> and show it in as a result for which there is a <code>TableLayout</code>.</p>
  
  <p>The two inputs that the <code>AutoCompleteTextView</code> takes is <strong>My Location</strong> and <strong>Destination</strong> from the users. The complexity comes from the type of input that the <code>AutoCompleteTextView</code> generates. The <code>AutoCompleteTextView</code> uses the <code>PlacesAutoComplete</code> from Google, therefore I am working with an inputs like <em>Jamal, Kathmandu, Central Region, Nepal</em> and maybe <em>Kalanki, Kathmandu, Central Region, Nepal</em>. What I would want the <code>TableLayout</code> to reflect is <strong>Results: From ... To ...</strong> </p>
  
  <p>My question is how can I just take in the first part of the string in <em>Jamal, Kathmandu, Central Region, Nepal</em> which is just <em>Jamal</em> for the <code>TableLayout</code> to display a the results like <strong>Results: From Jamal to Kalanki</strong>. Being very new to android I sort of have a vague idea, the code that I tried looks like this.</p>
  
  <pre><code>String[] from;
  String[] to;
  //pulling the auto complete text view
  from =  location.getString().toText();
  to = destination.getString().toText();
  //referencing the text view inside the table layout
  results.setText(new StringBuilder().append("Results from"+from[0]).append(" to"+to[0]));
  </code></pre>
  
  <p>This code obviously does not work as it prompts me to change <code>from</code> to a <code>String</code>. I really do not know what is going on. Please help ?</p>