udacity / ud851-Exercises

Apache License 2.0
2.04k stars 6.81k forks source link

T03.01-Exercise-RecyclerViewLayout - conflicting name between Main activity and xml rescources #468

Closed morallito closed 3 years ago

morallito commented 4 years ago

I'm having problems to see the resolution of this exercice.

        int layoutIdForListItem = R.layout.number_list_item;
                                          ^
  symbol:   variable number_list_item

I'm getting this error and I have no Idea how to solve it. It looks like a file called number_list_item is missing inside the floder layout.

eitanrab commented 4 years ago

unsubscribe

On Wed, Apr 15, 2020 at 5:02 PM Iago Henrique Pires Moreira e Morais < notifications@github.com> wrote:

The name of the Recicler view rescource on the MainActivity.java is "number_list_item", but the name of this on the xml file is rv_numbers.

It's happenning on the exercice (The todo tells you to set the rrong name) and on the solution is with the rrong names to.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/udacity/ud851-Exercises/issues/468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGFQBZNHQ27WNNDRZ5IBALRMW47ZANCNFSM4MITGEYA .

LaszloLajosT commented 4 years ago

It happens because "number_list_item.xml" file doesn't exist yet. Just make the changes and move on to the next task (exercise) where you will create it. (I assume you already figured it out.)

Sagar0-0 commented 3 years ago

<view class="android.support.v7.app.AlertController$RecycleListView" android:id="@+id/rv_numbers" android:layout_width="match_parent" android:layout_height="match_parent"/>