This week's book giveaways are in the Functional Programming and Linux forums. We're giving away four copies each of Reactive Design Patterns and Learn Linux in a Month of Lunches and have the authors on-line! See this thread and this one for details.
i need to get the butting id which is not defined in R.layout.activity_main.xml file.Currently i am getting error for phone=(Button)findViewById(R.id.phone);.Because its definde in another xml file.can anyone help me.
posted 3 years ago
You can only get a reference to a GUI element that is part of a view that is inflated. It doesn't sound as if that would be the case in your code.
What do you propose to do with a reference to a GUI element that doesn't (yet) exist?