In my application, i’m drag & drop my textview, imageview from one Linear Layout to another one.How can i find the current location of textview or imageview whether it is first Layout or Second Layout programatically.
Share
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 can get the view parent by calling
view.getParent(), and then casting it toLinearLayout. Then, i’d just check the parent id withview.getId()and check if it equalsR.id.nameOfYourFirstLayoutorR.id.nameOfYourSecondLayout