Activity 获取 view getContentView

public static View getContentView(Activity ac){
       ViewGroup view = (ViewGroup)ac.getWindow().getDecorView();
       FrameLayout content = (FrameLayout)view.findViewById(android.R.id.content);
       return content.getChildAt(0);
}

你可能感兴趣的:(Activity 获取 view getContentView)