[关闭]
@xiaoyixy 2015-10-20T14:01:25.000000Z 字数 940 阅读 1907

在全屏状态下触发 resize() 事件

Hybrid


Ⅰ 通过 res/values/style.xml 文件来使应用全屏并关闭窗口标题;
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Theme" parent="android:Theme.Light">
        <item name="android:textViewStyle">@style/Theme.TextView</item>
        <item name="android:windowTitleStyle">@style/WindowTitle</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
    </style>
    <style name="WindowTitle" parent="@android:style/Theme">
        <item name="android:textSize">10sp</item>
        <item name="android:textColor">@android:color/white</item>
    </style>
    <style name="Theme.TextView" parent="@android:style/Widget.TextView">
        <item name="android:textSize">10sp</item>
        <item name="android:textColor">@android:color/black</item>
    </style>
</resources>

Ⅱ 通过在 manifest 中使用以下的属性;
<application
    android:icon="@drawable/icon"
    android:label="Demo"
    android:theme="@style/Theme" > 
    …
 </application>

Ⅲ 在 Html 中捕获 resize() 事件。
$(window).bind('resize', function() {
    console.error('onResize');
});
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注