Forum Xamarin.Android

Resources layout not being detected when initializing an Intent

I have a the Main activity initializing an intent when the user clicks a button:

    private void ButtonSetCartAvail_Click(object sender, System.EventArgs e)
        //Open Cart Status
        Intent activityCartStatus = new Intent(this, typeof(Resources.layout.CheckCartStatus));

However the intellisense is not picking it up even though it is in my Resource.Designer.cs file. In fact it is picking up only one of my 5 layouts. I have compiled it, leaving out the intent and then tried re-adding it to no avail. If I compile with the line of code I get an error stating that the type or namespace name does not exist in the namespace.

NOTE: I did change my namespace earlier but cannot explain why one layout is OK while the others are not. The CheckCartStatus layout was the most recent creation.

    public partial class Layout

        // aapt resource value: 0x7f030000
        public const int CheckCartStatus = 2130903040;

        // aapt resource value: 0x7f030001
        public const int DialogLogin = 2130903041;

        // aapt resource value: 0x7f030002
        public const int Main = 2130903042;

        // aapt resource value: 0x7f030003
        public const int ReturnBatch = 2130903043;

        // aapt resource value: 0x7f030004
        public const int ScanProduct = 2130903044;

        static Layout()

        private Layout()

<?xml version="1.0" encoding="utf-8"?>


  • RobertDavidsonRobertDavidson USMember ✭✭

    I should also mention I deleted the layout and gave it a different name and that did not work either.

  • RobertDavidsonRobertDavidson USMember ✭✭

    I found the problem. My activity did not have the full namespace.

Sign In or Register to comment.