Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

scrollview horizontal et vertical

Featured Replies

Posté(e)

Bonjour,

Je souhaite afficher au sein de mon application un simple tableau d'ImageView. Mon problème est que mon tableau ne peux pas rentrer dans l'écran et donc je souhaite permettre le scroll dans les deux sens : horinzontal et vertical.

Aujourd'hui, le seul moyen simple que j'ai trouvé est de combiner deux scroll view :

<HorizontalScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
	<LinearLayout
		android:layout_height="wrap_content"
		android:layout_width="match_parent"
		android:orientation="vertical"
		android:isScrollContainer="true">
		<LinearLayout
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:orientation="horizontal"
			android:isScrollContainer="true">
			<ImageView android:id="@+id/img1" android:layout_height="wrap_content" android:layout_width="wrap_content"
				android:src="@drawable/bot1"></ImageView>
			<ImageView android:id="@+id/img2" android:layout_height="wrap_content" android:layout_width="wrap_content"
				android:src="@drawable/bot2"></ImageView>

			<...>

		</LinearLayout>

		<...>

	</LinearLayout>
</ScrollView>
</HorizontalScrollView>

Le seul problème est que le scroll n'est pas vraiment utilisable : il n'y en a qu'un à la fois qui se déclenche (par ex horizontal en premier), et l'autre reste bloqué. Il faut relaché le doigt et scroller à nouveau.

Bref ça me plait pas et j'aimerais savoir si quelqu'un à déjà eu ce problème ou a tout simplement une solution (qui ne nécessite pas de re-coder la ScrollView comme je l'ai vu dans mes recherche google : exemple) :)

Merci d'avance!

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.