在Android 4.1.2上点击Phonegap 3.0应用程序中的元素时,我完全摆脱了可怕的亮点.
当点击一些元素时,我首先在tapped元素下获得一个橙色(在这种情况下)突出显示,但是然后快速连续的父元素(或另一个祖先元素,不确定哪个)也显示一个高亮显示!
我知道通过设置透明颜色可以"禁用"点击突出显示:
* {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent; /* For some Androids */
}
Run Code Online (Sandbox Code Playgroud)
这实际上适用于我的应用程序中的大多数可点击元素,但在某些元素上,父/祖先元素仍然会突出显示!我创建了一个演示,演示了我正在测试的设备上的外观(三星Galaxy S3).是啊,没错.我正在使用jsfiddle作为动画工具:-)
我试图在另一个线程讨论的一切:禁用橙色轮廓亮点焦点.
由于点击突出显示实际上在上面用css规则点击的所有元素上消失了,我开始怀疑这个次要的较大高亮显示除了点击之外的其他内容.但我试图扩展css规则也适用于*:hover, *:active, *:focus没有成功.
我也试图在css之外和Android应用程序本身攻击问题.WebSettings中的第一个setLightTouchEnabled ()看起来很有希望,但A)它没有用,B)从API级别18它已经过时并且没有效果.
我真的很茫然.任何帮助都将非常感激.
我当前正在轮询服务器以检查新数据,然后相应地更新AngularJS应用程序中的模型.他大致正在做的事情:
setInterval(function () {
$http.get('data.json').then(function (result) {
if (result.data.length > 0) {
// if data, update model here
} else {
// nothing has changed, but AngularJS will still start the digest cycle
}
});
}, 5000);
Run Code Online (Sandbox Code Playgroud)
这很好,但大多数请求不会导致任何新的数据或数据更改,但$ http服务并不真正知道/关心,仍然会触发摘要周期.我认为这是不必要的(因为摘要周期是应用程序中最重的操作之一).有没有办法仍然可以使用$ http,但如果没有任何改变,以某种方式跳过摘要?
一种解决方案是不使用$ http而是使用jQuery,然后调用$ apply让Angular知道模型已经改变:
setInterval(function () {
$.get('data.json', function (dataList) {
if (dataList.length > 0) {
// if data, update model
$scope.value = dataList[0].value + ' ' + new Date();
// notify angular manually that the model has changed.
$rootScope.$apply(); …Run Code Online (Sandbox Code Playgroud) 在使用css关键帧动画中的translate 2d变换设置其位置动画时,IE 10和Firefox都会将元素捕捉到整个像素.
Chrome和Safari没有,当动画微妙的动作时看起来好多了.
动画按以下方式完成:
@keyframes bobbingAnim {
0% {
transform: translate(0px, 0px);
animation-timing-function:ease-in-out
}
50% {
transform: translate(0px, 12px);
animation-timing-function:ease-in-out
}
100% {
transform: translate(0px, 0px);
animation-timing-function:ease-in-out
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的意思的一个例子:
只需在Chrome和IE 10(或Firefox)中打开它,您就会注意到运动平滑度的差异.
我意识到可能有许多因素会影响这种行为,例如是否使用硬件加速来绘制元素.
有没有人知道一个修复程序试图强制浏览器总是在子像素上绘制元素?
我发现了类似的问题,但答案是使用translate转换动画,这正是我正在做的事情: CSS3 Transitions'snap to pixel'.
更新: 玩了一下之后我找到了Firefox的修复程序,虽然在IE 10中没有做任何事情.诀窍是稍微缩小元素并使用translate3d在Z轴上具有1px偏移:
@keyframes bobbingAnim {
0% {
transform: scale(0.999, 0.999) translate3d(0px, 0px, 1px);
animation-timing-function:ease-in-out
}
50% {
transform: scale(0.999, 0.999) translate3d(0px, 12px, 1px);
animation-timing-function:ease-in-out
}
100% {
transform: scale(0.999, 0.999) translate3d(0px, 0px, 1px);
animation-timing-function:ease-in-out …Run Code Online (Sandbox Code Playgroud) 我知道如何查看.ipa文件的配置文件的到期日期(通过将ipa重命名为zip,然后解压缩并查看embedded.mobileprovisioning文件中的ExpirationDate键).
但是,如何查看用于签署ipa的证书本身的到期日期?
我发现你可以使用codesign实用程序来"提取"证书:
codesign --display --extract-certificates /Applications/Example.app
Run Code Online (Sandbox Code Playgroud)
这会产生三个文件:codesign0,codesign1,codesign2.不知道如何继续.
我试图克隆我的数组,然后使用slice()函数从中删除一个元素.但是,每当我单击要删除的元素时,它会删除数组中除了单击之外的所有内容.
这是我目前的代码:
deleteContact(contacts: Contacts){
if (contacts === null || contacts === undefined) {
return;
}
const pos = this.contacts.indexOf(contacts);
if (pos < 0) {
return;
}
this.contacts = this.contacts.splice(pos, 1);
this.contactsListClone = this.contacts.slice();
this.contactListChangedEvent.next(this.contactsListClone);
}
Run Code Online (Sandbox Code Playgroud) angularjs ×2
css ×2
javascript ×2
ajax-polling ×1
android ×1
arrays ×1
certificate ×1
code-signing ×1
codesign ×1
cordova ×1
html ×1
ios ×1
ipa ×1
optimization ×1