Problème android:id en Kotlin

Fermé
Dorianopg Messages postés 22 Date d'inscription samedi 19 novembre 2022 Statut Membre Dernière intervention 2 septembre 2023 - 11 mars 2023 à 16:15
BunoCS Messages postés 15472 Date d'inscription lundi 11 juillet 2005 Statut Modérateur Dernière intervention 25 mars 2024 - 13 mars 2023 à 10:50

Bonjour, 

quand je veux attribuer un identifiant à mon vertical Recycler View ça ne marche pas alors que le horizontal recycler view tout à fonctionner. Je met le code ci-dessous.

Le code est en Kotlin mais le site ne le propose pas 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns: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="match_parent">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/horizontal_Recycler_view"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:orientation="horizontal"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
    
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/home_page_recents_projects"
        android:layout_marginTop="@dimen/Default_margin"
        android:layout_marginLeft="@dimen/Default_margin"
        style = "@style/SubTitleTextStyle"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/vertical_Recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginLeft="@dimen/Default_margin"
        android:orientation="vertical"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>


</LinearLayout>
A voir également:

1 réponse

BunoCS Messages postés 15472 Date d'inscription lundi 11 juillet 2005 Statut Modérateur Dernière intervention 25 mars 2024 3 894
13 mars 2023 à 10:50

Hello,

Quel est le message d'erreur ? As-tu essayé de clean ton projet ?


0