I'm probably trying to do something that is not supposed to work, but I have passed the activity to a class and then loaded a layout within the class. The layout is displayed and in the example attached, the DrawBtn_Click method fires as expected, but the EditText1_EnterPressed fails with the error Object should first be initialized.
If I initialize the views within the class, the DrawBtn_Click still fires, but the EditText_EnterPressed does not return the text, presumably a new EditText is created with the initialization.
It would be useful if this would work, but I imagine that it is down to differences in the complexity of the wrappers of each view.
If I initialize the views within the class, the DrawBtn_Click still fires, but the EditText_EnterPressed does not return the text, presumably a new EditText is created with the initialization.
It would be useful if this would work, but I imagine that it is down to differences in the complexity of the wrappers of each view.
Attachments
Last edited: