目前我正在使用Phonegap/Cordova(2.1.0/2.2.0),JQ-Mobi(不是jQueryMobile),HTML5和Javascript以及CSS3开发Android应用程序.该应用程序包含2个本机扩展.
不知何故,当我将项目导出到具有最新Android版本的设备时,该应用程序运行速度比2.3.5设备慢得多.
我已经尝试启用HardwareAcceleration并删除所有框阴影和其他难以渲染css3的东西.仍然在4.1.1或4.0.4上运行糟糕.
我也升级到最新版本的Cordova(现在的2.2.0),它似乎并没有让它变得更好.
应用程序启动时,Javascript DOM操作大约需要80-90%.
最糟糕的表现是切换面板和滚动表单,其中大多数都有一些过渡.我在三星Galaxy S2 android 2.3.5上测试了它看起来很好并且表现很好.相同的设备,但4.0.4运行糟糕.三星Galaxy S3 4.1.1运行速度更快.带有android 3.2.1的HTC Flyer P512运行它应该如何运行.
有人可以帮我从这里出去吗?我如何获得这种表现?我没有提到的任何提示或提示?
我想补充一点,我没有得到关于Iphone 3gs的问题,并解释说这肯定是一个Android问题.
我需要一些帮助才能使用Laravel 5.4验证我的表单.
我的表格:
{{Form::bsText('general[firstname]')}}
{{Form::bsText('general[lastname]')}}
Run Code Online (Sandbox Code Playgroud)
然后我有一个RequestObject用于验证,具有以下规则:
'general[firstname]' => 'required|string:max:255',
'general[lastname]' => 'required|string:max:255',
Run Code Online (Sandbox Code Playgroud)
这样,当不按预期方式为空时,它会生成"必需"错误.虽然当我填写一个字符串时,它仍然提供所需的错误消息.
我也从laravel文档中尝试了以下内容:
'general.firstname' => 'required|string:max:255',
'general.lastname' => 'required|string:max:255',
Run Code Online (Sandbox Code Playgroud)
和:
'general.*.firstname' => 'required|string:max:255',
'general.*.lastname' => 'required|string:max:255',
Run Code Online (Sandbox Code Playgroud)
以上两者都没有给出错误.
根据要求,这是我的完整Request对象:
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
$user = Auth::user();
return ($user && $user->isProjectManager()) ||
($user && $user->isAdmin());
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function …
Run Code Online (Sandbox Code Playgroud) 我知道这可能是早期的,但我现在很困惑..我在CSS中设置一个rgba颜色
#body{ color: rgba( 100,100,100,0.3 ) }
Run Code Online (Sandbox Code Playgroud)
当我要求Javascript给我这个元素的计算样式时,我得到了这个:
window.getComputedStyle(document.body)['color']
//rgba(100, 100, 100, 0.298039)
Run Code Online (Sandbox Code Playgroud)
在我期待的地方rgba(100,100,100,0.3)
.
我的问题:为什么?
这怎么可能,我该如何解决这个问题?
javascript ×2
android ×1
cordova ×1
css ×1
forms ×1
laravel ×1
performance ×1
php ×1
validation ×1