0

I'm trying to display an image but for some reason it's only giving me a smaller (unreadable) version. Is there a way to display the image full screen and enable zooming in/out? I used a fragment to display the image--do I need to create another class to extend the particular fragment...? Here is the imageview:

<ImageView
    android:id="@+id/imageView1"
   android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:layout_margin="5dp"
    android:scaleType="centerInside"
    android:src="@drawable/rules" />
user3293643
  • 91
  • 1
  • 3
  • 12

2 Answers2

0

If the image is not appering in the full screen, probably there is an issue with the ImageView container. The ImageView may be "filling the parent" but the parent is not filling the screen.

Other issue may be the scaleType, are you sure your image is the correct size? If you want to stretch it you have to change the scaleType.

hsgubert
  • 2,266
  • 1
  • 22
  • 23
0

How about this :

Get screen dimensions in pixels

and then something like this (IF you want to resize the image):

Android image on tablets and phones

This is not a complete answer to your question but the programming should be straightforward once you know the size of the screen and the size of the image.

Community
  • 1
  • 1
IanB
  • 3,489
  • 1
  • 20
  • 24