Android java accessing URL from a string rather than hard coded
<p>I am trying to access an image via URl using the below code:</p>

<pre><code>public class SingleListItem extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.setContentView(R.layout.details_list);

    TextView txtProduct = (TextView) findViewById(R.id.name);
    TextView txtLdesc = (TextView) findViewById(R.id.longdesc);
    SmartImageView imgPreview = (SmartImageView) findViewById(R.id.preview);

    imgPreview.setImageUrl(lpreview);
    Intent i = getIntent();

    // getting attached intent data
    String product = i.getStringExtra("title");
    String ldesc = i.getStringExtra("longdesc");
    String lpreview = i.getStringExtra("preview");

    // displaying selected product name
    txtProduct.setText(product);
    txtLdesc.setText(ldesc);
</code></pre>

<p>I am passing the "preview" value from another activity.  This contains the URL from which I want to grab the image, but it varies from user selection in the previous activity.  In <code>imgPreview.setImageUrl</code>, I would like to set that to the string <code>lpreview</code>, rather than hard coding it.  </p>
