get Parent View as ViewGroup - Android User Interface

Android examples for User Interface:ViewGroup

Description

get Parent View as ViewGroup

Demo Code


//package com.java2s;

import android.view.View;
import android.view.ViewGroup;

public class Main {
    public static ViewGroup getParent(View view) {
        return (ViewGroup) view.getParent();
    }//from w ww.  j  a v a2  s  . c  o  m
}

Related Tutorials