Activity 获取 view getContentView

版权声明:本文为博主原创文章,欢迎转载,转载请注明博主和原文链接。 https://blog.csdn.net/u014077888/article/details/26100387
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);
}

阅读更多

没有更多推荐了,返回首页