Eche043
Messages postés16Date d'inscriptionmercredi 20 septembre 2017StatutMembreDernière intervention30 mai 2020
-
8 déc. 2019 à 19:16
Eche043
Messages postés16Date d'inscriptionmercredi 20 septembre 2017StatutMembreDernière intervention30 mai 2020
-
9 déc. 2019 à 11:10
Bonjour à tous,
je suis un novice en développement android (je code avec Android Studio). Mon problème est que je veux afficher des information qui se trouve au niveau de Firebase grâce à cardview et recyclerview.
quand je test sur AVD sa passe bien, mais sur mon smartphone réel les information peuvent mettre des heures avant de s'afficher. souvent rien ne s'affiche.
bon les images expliquent mieux ce que je veux dire
sur l'emulateur tout est au top
sur le telephone rien ne s'affiche je dois patienter des heures souvent avant que tout sois ok, souvent rien ne s'affiche jamais.
<?xmlversion="1.0"encoding="utf-8"?><androidx.cardview.widget.CardViewxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:orientation="vertical"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginTop="20dp"android:layout_marginStart="15dp"android:layout_marginEnd="15dp"app:cardElevation="15dp"><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"><TextViewandroid:id="@+id/product_name"android:layout_width="match_parent"android:layout_height="wrap_content"android:text="Nom du produit"android:textAlignment="center"android:textSize="20dp"android:textStyle="bold"android:textColor="@color/colorPrimaryDark"/><ImageViewandroid:id="@+id/product_image"android:layout_width="match_parent"android:layout_height="200dp"android:layout_below="@+id/product_name"android:scaleType="center"android:layout_marginTop="2dp"/><LinearLayoutandroid:id="@+id/quantite_layout"android:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"android:layout_below="@+id/product_image"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="quantité disponible"android:layout_marginTop="4dp"android:textSize="15dp"android:textStyle="bold"android:textColor="@color/rouge"/><TextViewandroid:id="@+id/product_quantity"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginTop="4dp"android:layout_marginLeft="5dp"android:textStyle="bold"android:text="nombre"/></LinearLayout><TextViewandroid:id="@+id/product_description"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_below="@id/quantite_layout"android:text="Description du produit"android:textAlignment="center"android:textSize="20dp"android:textColor="@color/colorPrimary"/></RelativeLayout></androidx.cardview.widget.CardView>
BunoCS
Messages postés15505Date d'inscriptionlundi 11 juillet 2005StatutModérateurDernière intervention 5 février 20253 913 9 déc. 2019 à 09:19
Salut,
As-tu regardé dans les logs pour voir si tu as un crash ou un message d'erreur ?
Je ne vois pas où tu fais ta requête Firebase ni où tu récupères tes données...
A noter qu'on ne met pas une
RecyclerView
dans une
ScrollView
... C'est source de bug d'intégrer un composant scrollable dans un autre composant scrollable...
Eche043
Messages postés16Date d'inscriptionmercredi 20 septembre 2017StatutMembreDernière intervention30 mai 2020 9 déc. 2019 à 10:05
Merci pour ta réponse BunoCS le log me donne aucune erreur. je retire le ScrollView et je vous reviens
Eche043
Messages postés16Date d'inscriptionmercredi 20 septembre 2017StatutMembreDernière intervention30 mai 2020 9 déc. 2019 à 11:10
problème résolu après avoir retiré le ScrollView. Merci BunoCS
9 déc. 2019 à 10:05
9 déc. 2019 à 11:10