Open Hamamelis opened 10 years ago
I am trying to display a image from a URL in a ImageView, and I tried this method based on your java class it doesn't seem to work... I've crash application...
pics.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >
Pics.java import com.loopj.android.image.SmartImageView; import android.app.Activity; import android.os.Bundle; public class Pics extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pics);
SmartImageView myImage = (SmartImageView) this.findViewById(R.id.my_image); myImage.setImageUrl("http://www.remoteServer.com/img/disconnect.png"); }
}
In AndroidManifest
Are you providing width, height and internet permission
I am trying to display a image from a URL in a ImageView, and I tried this method based on your java class it doesn't seem to work... I've crash application...
pics.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >
Pics.java import com.loopj.android.image.SmartImageView; import android.app.Activity; import android.os.Bundle; public class Pics extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pics);
}
In AndroidManifest