我正在构建的应用程序在开始下一个活动之前有一个简单的图像按钮动画(旋转).我在模拟器和5种不同的设备上测试了它:
三星GT-I5500
三星Galaxy Nexus
三星Galaxy s2
摩托罗拉Razr Maxx
HTC(我不记得这个型号)
除了Nexus之外,动画在所有模型上都运行良好.在Nexus上,设备在开始下一个活动之前等待动画的持续时间(500ms),因此代替动画 - 只是令人烦恼(并且看似无法解释用户)延迟.除GT-I5500外,所有设备都运行Jelly Bean.
问题:
1)为什么动画可以在某些设备上运行而不在其他设备上运行,即使运行相同版本的操作系统?
2)有没有办法检查设备是否"接受"动画?(我最初认为它与SDK版本有关,但它没有)
我目前正在研究由8制作的交互式iOS通知,老实说,我真的很难看到我的按钮.使用下面的代码,我看不到我的按钮:
// INTERACIVE
UIMutableUserNotificationAction *acceptAction =
[[UIMutableUserNotificationAction alloc] init];
acceptAction.identifier = @"ACCEPT_IDENTIFIER";
acceptAction.title = @"Accept";
acceptAction.activationMode = UIUserNotificationActivationModeBackground;
acceptAction.destructive = NO;
acceptAction.authenticationRequired = NO;
UIMutableUserNotificationAction *maybeAction =
[[UIMutableUserNotificationAction alloc] init];
maybeAction.identifier = @"MAYBE_IDENTIFIER";
maybeAction.title = @"Maybe";
maybeAction.activationMode = UIUserNotificationActivationModeBackground;
maybeAction.destructive = NO;
maybeAction.authenticationRequired = YES;
UIMutableUserNotificationAction *declineAction =
[[UIMutableUserNotificationAction alloc] init];
declineAction.identifier = @"DECLINE_IDENTIFIER";
declineAction.title = @"Decline";
declineAction.activationMode = UIUserNotificationActivationModeBackground;
declineAction.destructive = YES;
declineAction.authenticationRequired = NO;
UIMutableUserNotificationCategory *inviteCategory =
[[UIMutableUserNotificationCategory alloc] init];
inviteCategory.identifier = @"INVITE_CATEGORY";
[inviteCategory setActions:@[acceptAction, maybeAction, declineAction]
forContext:UIUserNotificationActionContextDefault]; …Run Code Online (Sandbox Code Playgroud)