Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import android.view.ViewRoot;
  2.  
  3. View.getRootView()
  4.  
  5. Log.d(TAG, "traversing parents of " + currentView);
  6. ViewParent vp = currentView.getParent();
  7. View rootView = currentView.getRootView();
  8. while (vp != null) {
  9. Log.d(TAG, "Parent: " + vp);
  10. vp = vp.getParent();
  11. if (vp.equals(rootView))
  12. break;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement