android onCreate中获取view的宽高

    view.post(new Runnable() {
        @Override
        public void run() {
            int width = view.getWidth();
            int height = view.getHeight();
        }
    });

你可能感兴趣的:(android onCreate中获取view的宽高)