开发者

Getting Saved cursor position 2/2 out of range for (restored) text error in android?

开发者 https://www.devze.com 2023-04-13 03:02 出处:网络
Can any body help me what is the problem i am facing. My application works fine, But some time it will show FORCE CLOSE exception.

Can any body help me what is the problem i am facing. My application works fine, But some time it will show FORCE CLOSE exception.

I find er开发者_JS百科ror in logcat as.

10-14 11:01:50.484: ERROR/TextView(987): Saved cursor position 2/2 out of range for (restored) text


This message is actually generate by code in the TextView class method onRestoreInstanceState(). Somewhere in your code you are saving the state of a TextView then restoring it. Look for some TextView, or an instance of something derived from TextView. That is where you are getting this message.


I also met same problem. The only solution I know is you have to specify android:configChanges="orientation" inside the <activity> in your application's AndroidManifest.xml.

Reference: Changing orientation clears the TimePicker

0

精彩评论

暂无评论...
验证码 换一张
取 消