Skip to content

Instantly share code, notes, and snippets.

@pacificregmi
Created November 2, 2015 13:35
Show Gist options
  • Save pacificregmi/4ac54636db4305fe00bd to your computer and use it in GitHub Desktop.
Save pacificregmi/4ac54636db4305fe00bd to your computer and use it in GitHub Desktop.
Load Image from URL (Internet) in Android - image_from_url.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:layout_margin="16dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Load Image From URL (Internet) in Android ImageView"
android:textSize="20sp" />
<ImageView
android:id="@+id/image_view"
android:layout_width="fill_parent"
android:layout_height="300dp"
android:layout_marginTop="16dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="ViralAndroid.com"
android:textSize="24sp"
android:gravity="center|bottom"
android:textStyle="bold" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment