Android examples for User Interface:View Parent
get Parent View from a View
//package com.java2s; import android.view.View; public class Main { private static View getParentView(View view) { if (view.getParent() instanceof View) { return (View) view.getParent(); } else {//from w w w. j a va 2 s .c o m return view.getRootView(); } } }