赞
踩
首先是XML读取
- LinearLayout layout = (LinearLayout) LayoutInflater.from(
- mContext).inflate(R.layout.hotel_map_pop, null);
- layout.setDrawingCacheEnabled(true);
- layout.measure(MeasureSpec.makeMeasureSpec(0,
- MeasureSpec.UNSPECIFIED), MeasureSpec
- .makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
- layout.layout(0, 0, layout.getMeasuredWidth(),
- layout.getMeasuredHeight());
- layout.buildDrawingCache();
- Bitmap bitmap = layout.getDrawingCache();
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。