I have an activity that when created contains an EditText but if you click a button it is replaced with a custom view called a MinPick. I need another class to get the view via findViewById(). But of course I need to define what the variable getting the id should be. Either EditText or MinPick. How do I do some sort of conditional if it is not an EditText it must be a MinPick.
Share
You can use “instanceof”: