Picture going outside the phones screen

WDJohn

New Member
I am trying to make an image application and i have a button and and image view in one of my xml files. I have a default picture on the image view. On some devices its to small or its too big. I dont want the picture to go outside the screen or over the button. How would i do this?here is the xml code\[code\]<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" ><Button android:id="@+id/btakePic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:text="Take Picture" /><ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="400dp" android:gravity="center" android:src="http://stackoverflow.com/questions/11478089/@drawable/android_syh" /></RelativeLayout>\[/code\]
 
Back
Top