dialog

Dialog do not show positive and negative button

狂风中的少年 提交于 2019-12-17 19:32:34
问题 I used AlertDialog to alert user confirm delete. I check on my device (Android 5.1) and it show well But on some another device (also run Android 5.1), the dialog missed positive and negative button. I checked and found that devices happen this issue have a medium resolution (960x540, 854x480). Is resolution relate with this issue ? If not, can you tell me the reason and how to fix this issue ? My code for display dialog: public static final Dialog yesNoDialog(Context context, String message,

How to check if an other program is running in fullscreen mode, eg. a media player

谁说胖子不能爱 提交于 2019-12-17 19:06:32
问题 How can I check if an other app is running in full screen mode & topmost in c++ MFC? I just want to disable all of my auto dialogs (warnings) if media player or other players are running. (Like silent/gamer mode in Avast.) How could I do that? Thank you. 回答1: using a combination of EnumWindows, GetWindowInfo and GetWindowRect does the trick. bool IsTopMost( HWND hwnd ) { WINDOWINFO info; GetWindowInfo( hwnd, &info ); return ( info.dwExStyle & WS_EX_TOPMOST ) ? true : false; } bool

Android: How to get the time from a TimePicker when it is typed in

左心房为你撑大大i 提交于 2019-12-17 18:09:32
问题 I've got a DialogPreference which implements a simple TimePicker.OnTimeChangedListener (see below). Setting the time by clicking the +/- buttons works great. But I don't know how to save the state of the timepicker when the user typed in the time directly into the textfield. It could be sufficient to access to the current textfield value, so I'd be able to persist it in onDialogClosed. But timePicker.getCurrentHour() won't do it. Please help... public class TimePreference extends

Always-in-front dialogs

99封情书 提交于 2019-12-17 16:46:09
问题 Is there a way to create a modeless dialog box in C++ MFC which always stays on top of the other windows in the application? I'm thinking sort of like the Find dialog in Visual Studio 2005 - where it stays on top, but you can still edit the underlying text. (If it makes any difference, it's not MDI; it's a dialog-based app) 回答1: From Nish: Making your dialog stay on top Haven't you seen programs which have an "always-stay-on-top" option? Well the unbelievable thing is that you can make your

Launching Dialog from Service

♀尐吖头ヾ 提交于 2019-12-17 16:29:27
问题 I want to launch a dialog from a service that hovers over whatever the user is currently looking at. The dialog gets launched like this: service gets trigger to open dialog > start transparent activity > transparent activity shows dialog. My problem is when the user opens the app, launches into the main menu, and then presses HOME to leave. By pressing HOME, it leaves the main menu activity on pause, not destroyed, and when the service starts the dialog, the main menu gets shown underneath

jQuery UI dialog 参数说明

五迷三道 提交于 2019-12-17 16:24:48
前段时间碰到个问题 jquery UI dialog弹出层 弹出多个层是 比如弹出两个层A和B B层如果显示的数据表格太大,伸到了A层的外面,那伸到A层之外的部分就看不到了,因为B层是在A层上弹出的 B的大小受到A层大小的限制 于是找到了这个资料 保存下来 ----------------------------------------------------------------------------------------------------- 初始化参数 对于 dialog 来说,首先需要进行初始化,在调用 dialog 函数的时候,如果没有传递参数,或者传递了一个对象,那么就表示在初始化一个对话框。 没有参数,表示按照默认的设置初始化对话框,在当前最新版本的 jQuery UI 1.8.9 中, dialog 支持下列属性。 autoOpen 初始化之后,是否立即显示对话框,默认为 true modal 是否模式对话框,默认为 false closeOnEscape 当用户按 Esc 键之后,是否应该关闭对话框,默认为 true draggable 是否允许拖动,默认为 true resizable 是否可以调整对话框的大小,默认为 true title 对话框的标题,可以是 html 串,例如一个超级链接。 position 用来设置对话框的位置,有三种设置方法

Android display another dialog from a dialog

喜欢而已 提交于 2019-12-17 15:56:36
问题 I am trying to display a dialog from the onClick listener of a button of another dialog, but the 2nd dialog won't display. I searched and found a similar problem- Dialogs order in Android, tried the solution provided, but even that does not work. My code is very similar to the one provided in the answer. public void onClick(DialogInterface dialog, int id) { showDialog(SECOND_DIALOG); dialog.dismiss(); } any help will be really appreciated. Thanks, Akshay 回答1: This is how I'm doing it: if (

PopUp dialog Android from background thread

…衆ロ難τιáo~ 提交于 2019-12-17 12:35:42
问题 I need a popup dialog to be shown when i get a message from different thread but the dialog should be not dependent on Activity i.e, it should display the dialog wherever the screen focus is. Can it be done? Because the dialog is handled per Activity, I thought of using a service but again it would be one more thread added and I want to avoid that. Any other options available? 回答1: If you're trying to ask how to show a dialog when your activity is not the focused activity on the user's phone

Uncaught TypeError: Object [object Object] has no method 'dialog'

假如想象 提交于 2019-12-17 10:52:50
问题 I am trying to use the jQueryUI dialog in an MVC3 application but having an issue with it. The dialog I have is loading a partial view into it where the user will either edit or create a new item. This works fine but if I try to save or update the item, or if I try to close it I get the message in the title. I have added all of the required .js files but still getting the error. I have also used firebug but still can't find why error is happening. HTML <span class="EditLink ButtonLink"

JavaFX Alerts and their size

不问归期 提交于 2019-12-17 10:47:35
问题 Recently, JavaFX introduced Alerts (Java 8u40). Consider the code example below. How can I display a full message that is longer than just a few words? My messages ( contentText property) get cut at the end with ... and the Alert does not adjust its size properly in my opinion. On my Linux machine with Oracle JDK 8u40, I only see the text This is a long text. Lorem ipsum dolor sit amet , which is too short in some cases. Of course, the user can resize the Alert window manually and the text