I am new to Android programming and I have a little issue.
So I have 2 Activities and 2 layouts.
The problem is that I have a button in my second activity and when I try to declare it FindViewById() can't find the id from the second layout. I re-built the app and I double checked the IDs - they match but simply the function FindViewById() does not find my button's id. Example: I have a button in my second layout(second activity? i don't know what is correct to say, as I said im new to android programming) The button ID is = LoginButton, When I go to my second activity and type Button LoginButton FindViewByID(Resources.Id.LoginButton); The function does not find it :/ Im so confused. Please help me
This is because the Resource.Designer can not be created successfully and that is because you have errors in your Layout, so always be aware to check if all properties are defined good.
In MenuList.axml:
android:textColor="000"
to android:textColor="#000"
(most likely this is the problem)android:layout_height="210.5dp"
do you really need those .5 dp? I suggest to put it to android:layout_height="210dp"
android:layout_marginBottom="0.0dp"
the margin is anyway 0dp.After doing this changes Clean and Rebuild the project and see if the error disappear.
To track this kind of errors put your Build in diagnostic so you can see what is making a problem.