Question sur scroll et zoom(android)

JackDannyL Messages postés 12 Date d'inscription   Statut Membre Dernière intervention   -  
 Utilisateur anonyme -
Bonjour,

Pour android avec eclipse

J'ai une image qui doit dépasser de pas mal l'écran... j'aimerais pouvoir zoomer avec les doigts et ameliorer mon scroll de l'image...

J'ai essayer avec ZoomControls et ZoomButtons mais ca crée des icones de zoom... et ca ne marche pas avec les doigts....

En ce moment je peut scroller de gauche a droite et de haut en bas mais pas en meme temp (en diagonale)... ce qui n'est pas tres important car je suis quand meme capable de scroller dans les 2 sens mais seulement dans 1 sens a la fois... si je commence a scroller horizontalement tant que jai pas lacher lecran je peut pas scroller verticalement

1- est-ce possible de programer le zoom comme le scroll en XML sans les boutons???
2- sinon comment faire le plus simplement possible...

voici ou j'en suis


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<RelativeLayout
android:id="@+id/map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:layout_marginLeft="0dp">

<ImageView
android:id="@+id/imageViewMap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/testmap" />

<ImageButton
android:id="@+id/imageBattle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="108dp"
android:layout_marginTop="202dp"
android:background="#00000000"
android:contentDescription="Map"
android:scaleX="0.4"
android:scaleY="0.4"
android:src="@drawable/icone_battle" />


</RelativeLayout>
</HorizontalScrollView>
</ScrollView>

<Button
android:id="@+id/ButtonCallMenu1"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="@drawable/icone_menu"
android:textColor="#FFFFFF" />

</RelativeLayout>

merci :)

A voir également:

1 réponse

Utilisateur anonyme
 
Bonjour,

voir içi pour un zoom à 2 doigts sur une imageview
0