I would like to know what is the difference between View and ViewParent ? I am trying to get the Id of the parent of an ImageView but this I can\'t do :
ImageView
You have to cast your parent view to a View, so you can use getId() method, using ((View) myImageView.getParent()).getId()
View
getId()
((View) myImageView.getParent()).getId()