- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在尝试手机间隙,我希望我的应用程序不会在用户将手指拖过屏幕时上下滚动。这是我的代码。谁能告诉我为什么它仍然允许滚动?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name = "viewport" content = "user-scalable=no,width=device-width" />
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<!-- iPad/iPhone specific css below, add after your main css >
<link rel="stylesheet" media="only screen and (max-device-width: 1024px)" href="ipad.css" type="text/css" />
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" />
-->
<!-- If you application is targeting iOS BEFORE 4.0 you MUST put json2.js from http://www.JSON.org/json2.js into your www directory and include it here -->
<script type="text/javascript" charset="utf-8" src="phonegap.0.9.5.1.min.js"></script>
<script type="text/javascript" charset="utf-8">
// If you want to prevent dragging, uncomment this section
/*
function preventBehavior(e)
{
e.preventDefault();
};
document.addEventListener("touchmove", preventBehavior, false);
*/
/* If you are supporting your own protocol, the var invokeString will contain any arguments to the app launch.
see http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
for more details -jm */
/*
function handleOpenURL(url)
{
// TODO: do something with the url passed in.
}
*/
function onBodyLoad()
{
document.addEventListener("deviceready",onDeviceReady,false);
}
/* When this function is called, PhoneGap has been initialized and is ready to roll */
/* If you are supporting your own protocol, the var invokeString will contain any arguments to the app launch.
see http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
for more details -jm */
function onDeviceReady()
{
// do your thing!
navigator.notification.alert("PhoneGap is working")
}
touchMove = function(event) {
// Prevent scrolling on this element
event.preventDefault();
}
</script>
<style>
#container {
width:100%;
height:100%;
}
</style>
</head>
<body onload="onBodyLoad()">
<div id="container" ontouchmove="touchMove(event);">
</div>
</body>
</html>
最佳答案
如果您使用的是 Cordova 2.3.0+,请找到 config.xml 并添加以下行:
<preference name="UIWebViewBounce" value="false" />
或在 Cordova 2.6.0+ 中:
<preference name="DisallowOverscroll" value="true" />
关于iphone - 如何防止在 phone-gap 中运行的应用程序垂直滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6193016/
我在《C 编程语言第二版》中读到了以下代码 /* shellsort: sort v[0] ... v[n-1] into increasing order */ void shellsort(int
如何更改GAP中的当前目录? ?我写道: gap> ChangeDirectoryCurrent("Users/anymuanalifah/Documents") 然后我收到一个错误。如果重要的话,我
我有一个关于列表中漏洞的问题。假设我有以下代码: gap> l:=[2,3,,5]; [ 2, 3,, 5 ] gap> for i in [1..Size(l)] do > Print(l[i],"
例如,当我从命令行启动脚本时,我想了解 GAP 的行为 $ gap mytest.gap 而不是从 GAP 内部调用它 gap> Read("mytest.gap"); 特别是,我试过 suppres
最低工作示例: x:=Indeterminate(Rationals,"x"); f:=Sum([1..1000],i->x^i); PrintTo("~/temp.txt",f); 它打印到 tem
我是 phone gap 的新手。我在 config.xml 中遇到错误。实际上我正在做 paypal 集成。 在 config.xml 中显示未绑定(bind)电话间隙命名空间。 当我运行时显示错误
有没有办法将单个 grid-row-gap 设置为不同于网格其余部分的特定大小? 用例:网格的第一行到第二行的间隙应该小于网格的其余部分,因为它充当标题。 最佳答案 grid-row-gap 和 gr
我有一个包含三个图像和一个文本部分的网格。我有网格的列和行间隙,如果我有所有三个图像,它就可以正常工作。但是,如果缺少任何图像,我仍然会得到缺少的列或行的列或行间隙。如果行或列不存在,是否有任何方法可
上周我一直在尝试解决堆栈溢出问题,但我仍然无法找到可行的解决方案,所以想知道是否有人可以为我提供一些帮助/建议? 数据结构说明 我有下表: 位置表(zz_position),用于保存详细信息职位(职位
当我玩入门练习“在 native Android 应用程序中使用 Worklight API”时,我无法从 native Android 页面连接到 Worklight 服务器,错误消息如下: Una
在计算 Tibshirani 的差距统计量时,引用分布中是否有推荐数量的模拟数据集 (B)? B=50? B=100? B=500? B=1000?如果是这样,有什么好的引用资料提到它吗? 最佳答案
我有一个 php 数组(通过表单中的复选框值获得 - 如您所知,复选框仅在未设置时显示在 _POST 变量中)。 Array ( [2] => 0,2 [3] => 0,3 ) 我需要
我正在尝试通过使用辅助表来填补使用组后的空白,你能帮忙吗? 处理没有订单的日子的辅助表 date quantity 2014-01-01 0 2014-01-02 0 2014-01
我试图通过使用辅助表来填补使用组后的空白,你能帮忙吗? 用于处理无订单天数的辅助表 date quantity 2014-01-01 0 2014-01-02 0 2014-01-0
你能告诉我如何去除红线和导航栏之间的白色间隙吗?CSS: /* Main */ #menu{ width: 100%; margin: 0; padding: 10px 0 0 0;
所以我创建了一个导航栏,并且它可以与水平导航一起使用。然而,我在导航栏之间有这些“间隙”,如下图所示,但我仍然可以在这些间隙之间单击。 这是 JSFiddle(SCSS 不起作用,所以我使用编译后的
在下面的 jsfiddle 中,我在第 2 行和第 3 行之间有一个空隙,我猜这是由于 CSS,但我不确定它为什么存在以及如何摆脱它。 如果我将第二行移到最后一行,间隙就会消失,但我想保持当前的行顺序
我创建了这个网站: https://jsfiddle.net/1pvk13o8/ 我正在使用 jquery masonry,一切似乎都很好,但有些行之间有空白或空洞,有什么帮助吗?我希望一切都按应有的
我有一个如下表,其中 X 列是给定开始和结束期间的商品价格。 X START_DATE END_DATE ------------------------------ 1 0
这个问题在这里已经有了答案: pandas or python equivalent of tidyr complete (4 个答案) 关闭 12 个月前。 我在寻找 pandas 数据框中的空白
我是一名优秀的程序员,十分优秀!