title: ListView with multiple lines and hyperlink
body: <p>I have a listView with multiple lines and I want to add one more line with a link, but i dont know how to do it.</p>
  
  <p><a href="http://i.stack.imgur.com/fp83F.png" rel="nofollow">example</a></p>
  
  <p>this is my code</p>
  
  <p>activity_main.xml</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:gravity="center_vertical|center_horizontal"
          android:text="Custom ListView Example" /&gt;
  
      &lt;ListView
          android:id="@+id/srListView"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" /&gt;
  
  &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>custom_row_view</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:paddingBottom="10dip"
      android:paddingLeft="10dip"
      android:paddingTop="10dip" &gt;
  
      &lt;TextView
          android:id="@+id/name"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#FF00A7FF"
          android:textSize="14sp"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/cityState"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  
      &lt;TextView
          android:id="@+id/phone"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>SearchResults.java</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public class SearchResults {
      private String name = "";
      private String cityState = "";
      private String phone = "";
  
      public void setName(String name) {
          this.name = name;
      }
      public String getName() {
          return name;
      }
  
      public void setCityState(String cityState) {
          this.cityState = cityState;
      }
      public String getCityState() {
          return cityState;
      }
  
      public void setPhone(String phone) {
          this.phone = phone;
      }
      public String getPhone() {
          return phone;
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>MyCustomBaseAdapter.java</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public class MyCustomBaseAdapter extends BaseAdapter {
      private static ArrayList&lt;SearchResults&gt; searchArrayList;
  
      private LayoutInflater mInflater;
  
      public MyCustomBaseAdapter(Context context, ArrayList&lt;SearchResults&gt; results) {
          searchArrayList = results;
          mInflater = LayoutInflater.from(context);
      }
  
      public int getCount() {
          return searchArrayList.size();
      }
  
      public Object getItem(int position) {
          return searchArrayList.get(position);
      }
  
      public long getItemId(int position) {
          return position;
      }
  
      public View getView(int position, View convertView, ViewGroup parent) {
          ViewHolder holder;
          if (convertView == null) {
              convertView = mInflater.inflate(R.layout.custom_row_view, null);
              holder = new ViewHolder();
              holder.txtName = (TextView) convertView.findViewById(R.id.name);
              holder.txtCityState = (TextView) convertView.findViewById(R.id.cityState);
              holder.txtPhone = (TextView) convertView.findViewById(R.id.phone);
  
              convertView.setTag(holder);
          } else {
              holder = (ViewHolder) convertView.getTag();
          }
  
          holder.txtName.setText(searchArrayList.get(position).getName());
          holder.txtCityState.setText(searchArrayList.get(position).getCityState());
          holder.txtPhone.setText(searchArrayList.get(position).getPhone());
  
          return convertView;
      }
  
      static class ViewHolder {
          TextView txtName;
          TextView txtCityState;
          TextView txtPhone;
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>MainActivity.java</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public class MainActivity extends Activity {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          ArrayList&lt;SearchResults&gt; searchResults = GetSearchResults();
  
          final ListView lv = (ListView) findViewById(R.id.srListView);
          lv.setAdapter(new MyCustomBaseAdapter(this, searchResults));
  
  
          lv.setOnItemClickListener(new OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id) {
                  Object o = lv.getItemAtPosition(position);
                  SearchResults fullObject = (SearchResults)o;
                  Toast.makeText(MainActivity.this, "You have chosen: " + " " + fullObject.getName(), Toast.LENGTH_LONG).show();
              }
          });
      }
  
      private ArrayList&lt;SearchResults&gt; GetSearchResults(){
          ArrayList&lt;SearchResults&gt; results = new ArrayList&lt;SearchResults&gt;();
  
          SearchResults sr = new SearchResults();
          sr.setName("Hospital de Lisboa");
          sr.setCityState("Avenida 123 nº15");
          sr.setPhone("212321234");
          results.add(sr);
  
          sr = new SearchResults();
          sr.setName("Hospital de Santarém");
          sr.setCityState("Rua de Cima nº20");
          sr.setPhone("234234234");
          results.add(sr);
  
  
  
          return results;
      }
  }</code></pre>
  </div>
  </div>
  </p>