Sorry, zoom is not in imageview implemented as I red. I will pass this feature on my app, it's not so important... Le 13 mai 2012 02:06, "huberte" <[email protected]> a écrit :
> Hi, > > A very easy thing, I thought. > > Have an image : exp1.png, which I want to fit the screen in landscape or > portrait, and wish that the user can scroll this image. > > Tell me please, if I do that correctly : > > 1. I did copy different resolution in xhdpi (1024x....) hdpi(640x....) and > ldpi,mdpi(480x...) > ---->first warning/error : > > 2. Have a Layout like this : > <ScrollView android:id="@+id/scrollView1" > android:layout_width="fill_parent" android:layout_height="fill_parent" > xmlns:android="http://schemas.android.com/apk/res/android"> > > <ImageView android:id="@+id/exp1_image" android:src="@drawable/exp1" > android:layout_width="fill_parent" android:layout_height="fill_parent" > android:scaleType="centerInside" /> > > </ScrollView> > > 3. Have a class like this: > public class ImageActivity extends Activity { > /** Called when the activity is first created. */ > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > ImageView image = (ImageView) findViewById(R.id.exp1_image); > } > } > > a. In portrait mode I have "margin" up and down (black screen), the image > does not fit the screen. I don't know hot to set the title of the image > (Image). > b. In landscape mode : the image is centered and not scaled, I have margin > left and right > > I cant zoom in the image. Scrolling is very good > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

