Java tutorial
//package com.java2s; import android.app.Activity; import android.view.View; public class Main { public static View getRootView(Activity activity) { View view1 = activity.getWindow().getDecorView().findViewById(android.R.id.content); View view2 = activity.findViewById(android.R.id.content); View view3 = activity.findViewById(android.R.id.content).getRootView(); return view2; } }