我无法识别我的奇怪显示器的原始分辨率,因此我必须为它设置自定义分辨率.问题是java无法识别它,因为它不在Win7的"已批准"列表中,因此全屏模式会"卡住".Netbeans出乎意料地全屏,所以必须有办法解决这个问题.谁知道呢?
//编辑(2010年3月29日):看起来NetBeans假装全屏而不是实际进入全屏独占模式,因此实际上这可能无法解决.现在,我也在假装它.看起来像java应该将活动的 DisplayMode 识别为有效.
此示例重现了此问题:
package resolutionexample;
import java.awt.Dimension;
import java.awt.DisplayMode;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class Main {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable(){
public void run() {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
DisplayMode currentDM = gd.getDisplayMode();
boolean currentInAvailable = false;
System.out.println("Available resolutions:");
for ( DisplayMode availDM : gd.getDisplayModes() ){
//System.out.println(availDM.getWidth() + "x" + availDM.getHeight());
if ( availDM.equals(currentDM) ){
currentInAvailable = true;
}
}
System.out.println("Current resolution: " + currentDM.getWidth() …Run Code Online (Sandbox Code Playgroud) 我正在为iPad编写带有嵌入式视频标签的HTML5页面.
如何隐藏或禁用全屏按钮?我只需要在没有全屏选项的情况下显示视频.
在OS X Lion中,当用户全屏切换应用程序时,窗口向右移动到新空间,此新空间具有默认背景.
在QuickTime X中,当用户切换全屏时,创建的新空间上的桌面背景为黑色.
是否有代码为新创建的空间提供自定义桌面映像?我知道可以通过系统首选项更改Lion中每个空间的桌面背景,但我不需要更改它,但是在创建空间以让应用程序全屏显示时已经设置了它.
我正在开发一个应用程序,用户可以使用按钮显示/隐藏工具栏.问题如下:如果用户选择隐藏工具栏然后进入全屏模式,则会显示工具栏.
用户界面是以编程方式创建的(即不使用Interface Builder).
这是app delegate中的工具栏创建:
mainToolbar = [[NSToolbar alloc] initWithIdentifier:MAIN_TOOLBAR];
[mainToolbar setAllowsUserCustomization:NO];
[mainToolbar setDisplayMode:NSToolbarDisplayModeIconOnly];
[mainToolbar setDelegate:self];
[window setToolbar: mainToolbar];
Run Code Online (Sandbox Code Playgroud)
这些是按钮执行的操作:
-(void)hideToolbar {
editing = YES;
[mainToolbar setVisible:NO];
}
-(void)showToolbar {
editing = NO;
[mainToolbar setVisible:YES];
}
Run Code Online (Sandbox Code Playgroud)
我试图使用窗口委托方法修复它,但仍然在进入全屏模式时显示工具栏,无论其值如何editing.
- (void)windowDidEnterFullScreen:(NSNotification *)notification {
[mainToolbar setVisible:!editing];
Run Code Online (Sandbox Code Playgroud)
}
- (void)windowDidExitFullScreen:(NSNotification *)notification {
[mainToolbar setVisible:!editing];
Run Code Online (Sandbox Code Playgroud)
}
提前谢谢了!
我有一个基于Eclipse SWT/RCP的GUI.当GUI处于全尺寸并且我最小化它然后最大化它时,我看到Ui上的黑色/黑色一秒或更长时间然后它变得正常.我想知道,可能是什么原因
以下是截图 -

我有个问题.全屏请求在Firefox中运行良好,但在Chrome中,当我请求并取消全屏时,我无法再次请求它(F11正常工作).此外,当我重新加载页面时,它取消全屏.
jQuery('.fullScreen').click(function(){
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
jQuery('.fullScreen').css({'display' : 'none'});
jQuery('.minimize').css({'display' : 'block'});
});
Run Code Online (Sandbox Code Playgroud)
最小化:
jQuery('.minimize').click(function(){
if (document.exitFullscreen) {
document.exitFullscreen();
}
else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}
else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
jQuery('.fullScreen').css({'display' : 'block'});
jQuery('.minimize').css({'display' : 'none'});
});
Run Code Online (Sandbox Code Playgroud)
此外,当我按全屏显示esc时,它会最小化,但我无法使用我的按钮返回全屏.
我做了一些搜索,但我不知道这是否可能.我想使用该window.open()方法打开窗口可用宽度和高度的链接.类似于下面的代码.
var h = $(window).height();
var w = $(window).width();
$('#window-opener').live('click',function (e) {
window.open(this.href, 'Resource', 'toolbar=no ,location=0, status=no, titlebar=no, menubar=no,
width='+w',
height='+h);
e.preventDefault();
});
Run Code Online (Sandbox Code Playgroud)
这可能吗?如果没有,任何人都可以推荐一种类似的方法.
菜鸟android dev在这里。我对AsyncTask中的某些ProgressDialog有问题。
我想在创建ProgressDialog时应用一个主题,但是当我应用它时,该对话框将变为全屏显示,并且我的活动被隐藏了。当我在实例化时删除主题时,这很正常。
我只想知道为什么。
这是我的AsyncTask类:
公共类同步{
private static AppManager app = AppManager.getInstance();
public void Synchronise() {
}
AsyncTask<Void, Void, Boolean> task = new AsyncTask<Void, Void, Boolean>() {
private ProgressDialog pd;
@Override
protected void onPreExecute() {;
pd = new ProgressDialog(app.m_AppContext, android.R.style.Theme_Black);
pd.setTitle("Veulliez patienter");
pd.setMessage("Synchronisation en cours...");
pd.setCancelable(false);
pd.setIndeterminate(true);
pd.show();
}
@Override
protected Boolean doInBackground(Void... arg0) {
try {
//Synchronisation
Thread.sleep(2000);
Log.d("DEBUG","sync en cours");
} catch (InterruptedException e) {
e.printStackTrace();
return false;
}
return true;
}
@Override
protected void onPostExecute(Boolean result) { …Run Code Online (Sandbox Code Playgroud) Android视频在纵向时不适合视频的宽度,如何在纵向时使我的视频宽度适合我的视频宽度,当我将屏幕的方向更改为横向时我想要视频填充整个屏幕就像youtube应用程序一样.当在纵向时,视频将从屏幕的顶部到中间开始,并且在横向时用于填充整个屏幕.这是我尝试过的,我还添加了完整截图的链接
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="100" >
<VideoView
android:id="@+id/videoview"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="53" >
</VideoView>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="7"
android:background="@drawable/top_bar"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/settings"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp" >
<ImageView
android:id="@+id/set"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/desc"
android:src="@drawable/settings" />
</LinearLayout>
<LinearLayout
android:id="@+id/low_tab"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp" >
<ImageView
android:id="@+id/low"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/desc"
android:src="@drawable/low" />
</LinearLayout>
<LinearLayout
android:id="@+id/high_tab"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp" >
<ImageView
android:id="@+id/high"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/desc"
android:src="@drawable/high" />
</LinearLayout>
<LinearLayout
android:id="@+id/audio_tab"
android:layout_width="70dp" …Run Code Online (Sandbox Code Playgroud) android portrait fullscreen android-layout android-videoview
在Cocoa / AppKit中,从给出一个屏幕[NSScreen screens],我如何确定在该特定屏幕上是否正在运行全屏应用程序?我对使用Cocoa API进行全屏显示的应用程序最感兴趣,但是如果有一种解决方案还包含其他类型的全屏显示应用程序,则更好。该解决方案需要能够通过Mac App Store批准。
我的特定用例涉及一个菜单栏应用程序(NSStatusItem),并弄清楚是否完全显示了菜单栏[NSScreen mainScreen],以便允许全局键盘快捷方式在状态项(如果可见)上显示弹出框的位置,或在其上浮动窗口,如果没有可见的状态项。
NSScreens本身似乎没有公开有关Windows /应用程序的任何信息,NSRunningApplication也没有公开此信息。
也许有Carbon API可以找到答案吗?例如,如果我有一个窗口列表,则可以遍历它们,查看是否有任何窗口框架与屏幕框架完全匹配。另一方面,可能有一些具有类似框架但在其他应用程序下运行的应用程序(例如Backdrop应用程序,https: //itunes.apple.com/us/app/backdrop/id411461952?mt =12),因此这样的方法需要查看窗口级别。
fullscreen ×10
cocoa ×3
android ×2
java ×2
javascript ×2
macos ×2
appkit ×1
desktop ×1
eclipse-rcp ×1
html5 ×1
ipad ×1
jquery ×1
nstoolbar ×1
nswindow ×1
objective-c ×1
osx-lion ×1
portrait ×1
swing ×1
swt ×1
themes ×1
uiwebview ×1
video ×1
window.open ×1