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.

Problème d'orientation, de textView et d'espace sur l'écran

Featured Replies

Posté(e)

Bonsoir, voici mon problème illustré par les images ci-jointes. Il survient dans mon application Average ici.

Quand une matière est trop longue, comme l'EPS ou mieux l'ECJS, le nom est tellement long que l'on ne voit plus la matière. Pour régler le problème en portrait, j'ai mis un maxWidth="220dp". Sauf que le problème, c'est qu'en paysage, le texte est comprimé dans cette dimension, et ce qui tiendrait sur une ligne reste en deux lignes comme en portrait. Voici le code du xml.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
	android:id="@+id/linearLayout" 
 		android:layout_width="fill_parent" 
 		android:layout_height="wrap_content" 
 		xmlns:android="http://schemas.android.com/apk/res/android">
	<LinearLayout
		android:orientation="vertical" 
		android:id="@+id/linearLayout1" 
		android:layout_height="wrap_content" 
		android:layout_width="wrap_content">
		<TextView 
			android:layout_height="wrap_content" 
			android:id="@+id/nomMatiere" 
			android:layout_width="wrap_content" 
			android:textAppearance="?android:attr/textAppearanceLarge" 
			android:text="TextView" />
		<LinearLayout 
			android:layout_width="wrap_content" 
			android:id="@+id/linearLayout2" 
			android:layout_height="wrap_content">
			<TextView 
				android:layout_height="wrap_content" 
				android:id="@+id/textViewCoeff" 
				android:layout_width="wrap_content" 
				android:textAppearance="?android:attr/textAppearanceLarge" 
				android:text="Coefficient : "/>
			<TextView 
				android:layout_height="fill_parent" 
				android:id="@+id/coefficient" 
				android:layout_width="wrap_content" 
				android:textAppearance="?android:attr/textAppearanceLarge" 
				android:text="TextView"/>
		</LinearLayout>
	</LinearLayout>
	<TextView 
		android:textAppearance="?android:attr/textAppearanceLarge" 
		android:text="TextView" 
		android:id="@+id/moyenne" 
		android:layout_height="fill_parent" 
		android:gravity="right|center" 
		android:textSize="30dp" 
		android:layout_gravity="right" 
		android:layout_width="fill_parent"/>
</LinearLayout>      	

Les deux premières images sont celles avec maxWidth, les deux suivantes sans. Ce que je voudrais, c'est la première vue pour le portrait, et la troisième pour le paysage.

Modifié par Boobby69

Posté(e)

Pourquoi ne pas créer un layout portrait et un layout landscape ? Les deux fichiers layout ayant le même nom mais l'un étant dans le dossier "layout-port" et le second dans "layout-land".

J'espère que ça peut t'aider ;)

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.