今天在写程序中遇到如下问题,如此怪异,在网上找了很多,终于解决了问题:
java.lang.IllegalArgumentException: View not attached to window manager
解决方法:
在调用系统相机拍照相片后返回protected void onActivityResult(int requestCode, int resultCode, Intent data)方法,那么可能会抛出这个异常,原因就是返回activity后,重新运行onCreate方法,那些view重新画出来,某些需要初始化的变量没有设置好。处理这个问题,只要有两种方法:(关键第二点)
1. 限制屏幕翻转
可在AndroidManifest.xml中设定android:screenOrientation=”portrait”
2. 如果是需要翻转的,那么限制那些view做重画动作。
可在AndroidManifest.xml中设定android:configChanges=”orientation|keyboardHidden|navigation”
分享到:
相关推荐
问题解决:Fragment not attached to Activity的相关代码,更多详细内容请参考:http://blog.csdn.net/u012939909/article/details/53355836
一个Bug前几日出现这样一个Bug是一个RuntimeException,详细信息是这样子的: 代码如下:java.lang.IllegalArgumentException: View not attached to window manager at android.view.WindowManagerImpl....
XPopup 国内Gitee镜像地址: 承接软件外包服务 本公司提供全行业(即时通讯,直播,商城等)的软件外包服务,网站和系统定制,APP开发,微信小程序和公众号开发等,价格美丽。公司官网: 中文 | ...
水星MW300R无线路由上网设置方法.docx
ATTACHED
activity+多个fragment ,fragment与fragment的跳转 与传值,fragment返回fragment!
转换代码到图片使用 html2canvas,这是一个非常著名的从浏览器... ... 在实际使用的时候,有两个注意点: ...如果要完整截图,最好将元素从文档流中独立出来(例如 position:absolute) 2.默认生成的 canvas 图片在 retin
Options not to expand empty hubs or hub with only empty hubs attached Options to jump to arrived and removed devices Option to expand tree items to make selected arrived and removed devices visible ...
USB Attached SCSI - 2.pdf
This standard specifies the requirements for the USB Attached SCSI - 3 (UAS-3) transport protocol. The UAS-3 transport protocol defines a mechanism to transport SCSI commands using USB hardware. The ...
Working Draft American National Standard Project T10/2125-D Revision 05 14 July 2010 Information technology - Serial Attached SCSI - 2.1 (SAS-2.1)
SAS(Serial Attached SCSI)即串行SCSI技术,是一种磁盘连接技术,它综合了并行SCSI和串行连接技术(如FC、SSA、IEEE1394等)的优势,以串行通讯协议为协议基础架构,采用SCSI-3扩展指令集,并兼容SATA设备,是多...
The attached code shows how to locate files in a directory using the FileSystemObject. You can search just within the specified directory or include all subdirectories in the search.
Slave Device Address Represents the physical device attached to the modbus network Data Type Internal data representation, (i.e. input, coil, register) Data Address Point address within the device ...
o In the 'Copy Selected Files To...' window, you can now specify a subfolder in the attach filename format. For example, if the filename format is %folder_name%\%subject%_%attach_name%.%extension% ...
After Bluebeam integration is set up, Unifier users can use Bluebeam to add comments and markups to files that are within the Document Manager or attached to business process records. 21.1 Unifier ...
As it is necessary to store some information with each block a dword is attached to the front of each block at -4 the aligned address. Thus, memory request for up to 28 bytes allocates a 32-bytes ...
SAS-2's draft just prior to standardization: sas2r16.pdf (section 10.4.3 for SMP functions) is a useful reference. Technical work is ongoing for SAS 2.1 in which the firmware/software protocols ...
1.1.1 Manager and Controller Scripts...............................2 1.1.2 Script Communication.......................................3 1.1.3 Using the Singleton Pattern in Unity.........................
Working Draft Project American National T10/2212-D Standard Information technology - Serial Attached SCSI - 3 (SAS-3)