1

Can you give some projects how to insert an image like that on android?I want to add that image in my xml.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

</RelativeLayout>

How can I display it my image?

gem
  • 11
  • 1
  • 3

3 Answers3

1

Use an ImageView. It takes all the standard formats.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
1

You can use an ImageView:

<ImageView
    android:id="@+id/logo_small"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:src="@drawable/logo" />

and place your image file into res/drawable/logo.gif (or in a resolution specific drawable directory)

Henry
  • 42,982
  • 7
  • 68
  • 84
1

If you want to display moving GIF then there is not direct aproach, You have to try a way around, Refer bellow link for more details.

REF GIF in Android

OR you can load the image in a web View and display it. ( web view should be able to display the animation )

Nimish Choudhary
  • 2,048
  • 18
  • 17