In android UI can be created dynamically so is there a way to know if a child was created to a parent ?
For example, if i have a linear layout as a parent and i dynamically create a child button. Is there away to notify the parent ?
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.
It’s simple – if you have LinearLayout name linearLayout1, the only why to add child to him is
by calling the linearLayout.addView(View child) method.
so, you know exactly when the child added: it’s can be only after this method called 🙂
example: