当前位置: 编程技术>移动开发
本页文章导读:
▪Monkey测试有关问题 Monkey测试问题java.lang.IllegalStateException: Failure saving state:
ErrorDialog{416e83a8 #5 ErrorDialog} has target not in fragment manager:
AccountCheckSettingsFragment{41497d00}
at android.app.FragmentManagerImpl.saveAllState(FragmentManage.........
▪ jquerymobile-9 inset list跟list divider jquerymobile-9 inset list和list divider很久没有写博客了,最近一段时间懒了,嘿嘿。
今天介绍一下inset list和list diveder。在上篇文章中介绍了list,但是那个list是最基本,并不是太美观。我们可以使.........
▪ NSString去置换行符和空白字符 NSString去掉换行符和空白字符
headerData = [headerData stringByReplacingOccurrencesOfString:@"\r"
withString:@""];
......
[1]Monkey测试有关问题
来源: 互联网 发布时间: 2014-02-18
Monkey测试问题
java.lang.IllegalStateException: Failure saving state: ErrorDialog{416e83a8 #5 ErrorDialog} has target not in fragment manager: AccountCheckSettingsFragment{41497d00}
at android.app.FragmentManagerImpl.saveAllState(FragmentManager.java:1581)
at android.app.Activity.onSaveInstanceState(Activity.java:1164)
at com.android.email.activity.setup.AccountSetupActivity.onSaveInstanceState(AccountSetupActivity.java:41)
at com.android.email.activity.setup.AccountSetupBasics.onSaveInstanceState(AccountSetupBasics.java:485)
at android.app.Activity.performSaveInstanceState(Activity.java:1113)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1185)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:2796)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2854)
at android.app.ActivityThread.access$900(ActivityThread.java:126)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1167)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4456)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
java.lang.IllegalStateException: Failure saving state: ErrorDialog{416e83a8 #5 ErrorDialog} has target not in fragment manager: AccountCheckSettingsFragment{41497d00}
at android.app.FragmentManagerImpl.saveAllState(FragmentManager.java:1581)
at android.app.Activity.onSaveInstanceState(Activity.java:1164)
at com.android.email.activity.setup.AccountSetupActivity.onSaveInstanceState(AccountSetupActivity.java:41)
at com.android.email.activity.setup.AccountSetupBasics.onSaveInstanceState(AccountSetupBasics.java:485)
at android.app.Activity.performSaveInstanceState(Activity.java:1113)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1185)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:2796)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2854)
at android.app.ActivityThread.access$900(ActivityThread.java:126)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1167)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4456)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
[2] jquerymobile-9 inset list跟list divider
来源: 互联网 发布时间: 2014-02-18
jquerymobile-9 inset list和list divider
效果图如下:
很久没有写博客了,最近一段时间懒了,嘿嘿。
今天介绍一下inset list和list diveder。在上篇文章中介绍了list,但是那个list是最基本,并不是太美观。我们可以使用jquerymobile的data-inset属性让其变得美观一下。代码如下:
<!DOCTYPE html> <html> <head> <title>Inset List Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>My Header</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true"><!--这里使用的data-inset属性--> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> </div> <div data-role="footer"> <h4>My Footer</h4> </div> </div> </body> </html>
这样就看起来好看一点了。有时候我们需要在一个很长的列表中添加一行用于区分的数据,这时候我们就可以使用data-role="list-divider",添加到其中的某一个li上,这样就能实现区分的效果。一个例子代码如下:
<!DOCTYPE html> <html> <head> <title>List Divider Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>My Header</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true"> <li data-role="list-divider">A</li> <li>A-1</li> <li>A-2</li> <li>A-3</li> <li data-role="list-divider">B</li> <li>b-1</li> </ul> </div> <div data-role="footer"> <h4>My Footer</h4> </div> </div> </body> </html>
效果图如下:
如果哪里错了还请指出。
[3] NSString去置换行符和空白字符
来源: 互联网 发布时间: 2014-02-18
NSString去掉换行符和空白字符
NSString* headerData=***;
headerData = [headerData stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; //去除掉首尾的空白字符和换行字符
headerData = [headerData stringByReplacingOccurrencesOfString:@"\r" withString:@""];
headerData = [headerData stringByReplacingOccurrencesOfString:@"\n" withString:@""];
如此即可。
最新技术文章: