我有一个使用Visual Studio 2008和C#(智能设备项目)开发的Windows Mobile应用程序.当我运行应用程序时,顶部显示一个开始菜单栏,底部显示键盘栏.如何让我的应用程序以全屏模式运行?
如果可能的话,我希望有一个解决方案,允许我在运行时打开和关闭全屏模式(例如,在单击某个表单按钮后).
我听说flash动作脚本3在全屏模式下禁用了键盘交互.我该如何启用.
在我的网站上,我有一些图像,我在fancybox中显示它们.一切正常,但现在网站的要求是对照片采用全屏模式,全屏我的意思是我想在我的花式框底部添加一个按钮,当用户点击该按钮时,当前图像(fancybox图像)必须以全屏模式显示.
全屏示例:http://buildinternet.com/project/supersized/slideshow/3.2/demo.html
但是这个例子并不适合我的情况因为我仍然需要在全屏模式之前使用fancybox.
所以有人有一些代码可以分享或者一些好的库,我可以做那个集成btw jQuery Fancybox和一些全屏api?谢谢
我正在尝试创建一个HTML5游戏,我想在现代桌面浏览器中工作,加上我可以动手的智能手机.目前,这意味着iPhone 3/4和几个Androids ......
这个游戏基本上是一个占据整个屏幕的画布,我手动调整大小(处理onResize事件)如下:(这是我发现最好的,通过反复试验,如果你有任何提示,我会喜欢听他们!)
在所有情况下,我都有这些元标记:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, target-densitydpi=device-dpi" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
Run Code Online (Sandbox Code Playgroud)
现在我的大问题是iPhone 4 ...我上面提到的iPhone 3设置运行完美,但它显示在低分辨率,看起来像垃圾.我无法成功地以完整的Retina分辨率显示它,而无需滚动和(这是关键)响应手机的旋转.
我得到的最接近的是设置
<meta name="viewport" content="width=640, initial-scale=0.5 (etc)" />
Run Code Online (Sandbox Code Playgroud)
并将画布设置为窗口外部宽度和高度而不是内部.这看起来很华丽; 然而,一旦我旋转手机,它就会全部搞砸了,如果我把它旋转回肖像,那就更加搞砸了.
令人惊讶的是,刷新并没有解决它,我需要将元视口中的"初始比例"更改为1,刷新,然后再返回0.5并再次刷新.
有没有办法做我想做的事情?
非常感谢你!
丹尼尔
我用了一个标签菜单ViewPager.每个选项卡都包含android.support.v4包中的片段(与旧SDK兼容).其中一个片段是WebView(调用FragmentWeb),我希望它保留在寻呼机布局中.问题是当我WebView充气时,它以全屏模式运行.
有没有办法让网页浏览器保持在我的标签下?
谢谢
我的片段类:FragmentWeb.java
public class FragmentWeb extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View mainView = (View) inflater.inflate(R.layout.fragment_web, container, false);
WebView webView = (WebView) mainView.findViewById(R.id.webview);
webView.loadUrl("http://www.google.com");
return mainView;
}
}
Run Code Online (Sandbox Code Playgroud)
My Fragment的布局:fragment_web.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) 无论屏幕尺寸如何,我都希望我的框架组件始终在屏幕上进行调整.我在我的笔记本电脑(小屏幕)中绘制框架,当我在具有大屏幕的另一台机器(jar文件)中运行我的应用程序时,框架组件不会重新调整尺寸!
当我在任何机器中以全屏模式放置框架时,如何使框架调整其组件大小?

package package_MSM;
import java.awt.Color;
public class MSMGui extends JFrame
{
private static final long serialVersionUID = 1L;
private JPanel contentPane;
private JTextArea textArea;
private JPanel pnlLogo1;
private JLabel lblLogo1;;
private static JButton btnSmpd1;
private static JButton btnSmpd2;
private static JButton btnSmpd3;
private static JButton btnSmpd4;
private static JButton btnSmpd5;
private static JButton btnSmpd6;
private static JButton btnSmpd7;
/**
* Launch the application.
*/
public static void main(String[] args)
{
EventQueue.invokeLater(new Runnable()
{
public void run()
{ …Run Code Online (Sandbox Code Playgroud) 我有一个文档结构,保持页面顶部的页眉和底部的页脚.只要中间的内容小于窗口的高度,它就能正常工作.如果内容太长,页脚会在页面下方进一步向下推,并显示一个完整的滚动条.如何将滚动条限制为内容DIV.
请注意,页眉和页脚的内容不固定,因此我不知道这些元素的高度,并且无法将内容元素的顶部位置设置为固定值.我在示例中添加了一个显示/隐藏功能来演示这一点.
我试图在纯CSS中解决这个问题(避免使用Javascript).我知道使用javascript,我可以监视窗口大小和元素可见性的变化,我可以计算页眉和页脚的高度,并为内容元素设置固定的尺寸.但是有没有非JavaScript的解决方案?
html { height: 100%; }
body {
padding:0 0;
margin:0 0;
height: 100%;
}
#main {
display:table;
height:100%;
width:100%;
}
#header, #footer {
display:table-row;
background:#88f;
}
#more {
display: none;
}
#content {
display:table-row;
height:100%;
background:#8f8;
}
Run Code Online (Sandbox Code Playgroud)
它适用于所有现代浏览器,台式机,平板电脑和手机.对于旧版浏览器,全身滚动条就可以了.
有没有一种方法可以在iOS Safari(移动网络)上触发全屏。全屏或全视口都很棒。这是我在下面尝试过的:
<video id="mobile_content">
<source src="someurltocontent"></source>
</video>
function makefullscreen(element){
if(element.requestFullscreen) {
element.requestFullscreen();
}
else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
}
else if(element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
}
else if(element.msRequestFullscreen) {
element.msRequestFullscreen();
}
else{
var requestFullscreen =
document.documentElement.requestFullscreen ||
document.documentElement.webkitRequestFullscreen ||
document.documentElement.mozRequestFullscreen ||
document.documentElement.requestFullScreen ||
document.documentElement.webkitRequestFullScreen ||
document.documentElement.mozRequestFullScreen;
if (requestFullscreen) {
requestFullscreen.call(document.documentElement);
}
else {
console.log("really!? come on...");
}
}
}
Run Code Online (Sandbox Code Playgroud)
根据用户操作,上述功能会传递一个视频元素,如果可以使用全屏,则在视频元素上执行全屏。
这不适用于Safari for IPAD。
一种解决方法是将控件attr应用于视频标签,然后让用户使用本机播放器全屏启动全屏。
<video id="mobile_content" controls>
<source src="someurltocontent"></source>
</video>
Run Code Online (Sandbox Code Playgroud)
除上述内容外,还有其他想法吗?
我想知道如何隐藏Android应用程序中的导航栏?
我知道如何隐藏它,但是一旦我触摸屏幕,它就会弹回来.我想隐藏它,就像Clash of Clans之类的游戏隐藏它一样,弹出它的唯一方法是向下滑动通知或者滑动导航栏应该在哪里.
我有一个页面,其中包含使用视频标记的视频.此外,我的页面使用animate.css为我的元素添加一些动画.问题是当我在animate.css中使用样式时,我的视频无法正确显示全屏.这是我的页面示例:
<div id="wrapper">
<div id="page-wrapper" class="gray-bg dashbard-1">
<h2 id="sv_title">Here is some text for illustration</h2>
<div class="animated fadeInRight">
<video src="http://www.w3schools.com/html/mov_bbb.mp4" controls=""></video>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
https://jsfiddle.net/p4nmt637/
此外,这个问题似乎只发生在chrome,我在FireFox和Safari中测试过,我没有这个问题.
fullscreen ×10
android ×2
javascript ×2
actionscript ×1
animate.css ×1
c# ×1
canvas ×1
css ×1
fancybox ×1
flash ×1
fragment ×1
html ×1
iphone-4 ×1
java ×1
jquery ×1
resolution ×1
scroll ×1
swing ×1
video ×1
webview ×1