Is it possible to find a view by its name rather than its id.
findViewById(R.id.someView);
but I would like to do something like this:
findViewByName("someView");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you have to find views by identifier when dealing with xml, but you can look up the identifier by using getIdentifier(String name, …) which is useful if you have your layouts numbered for example. Just be aware that such a lookup is relatively expensive.
to complete the answer