dialog

Android-Show Custom Dialog

馋奶兔 提交于 2020-01-11 11:38:11
问题 In my android application, I am using a custom dialog. When I try to show the dialog, it causes an error. I don't know what I am doing wrong, and I am really confused. Here is my code: protected Dialog onCreateDialog(int id) { Dialog dialog; switch(id) { case 0: dialog = new Dialog(getApplicationContext()); dialog.setContentView(R.layout.paused); dialog.setTitle("Game Paused"); dialog.show(); break; default: dialog = null; } return null; } And here is how I show the dialog showDialog(0); By

jquery clean old dialog

好久不见. 提交于 2020-01-11 10:54:10
问题 I am trying to use UI dialog to create a modal dialog. The dialog workscorrectly, and all is well. I close the dialog using the "X" in the corner. I tried using dialog('destroy').remove(); , but then of course I can't open it again. I think I just don't understand how to reinitialize the dialog and do not have the old values in it. function CreateWorkBoard() { var jsmarty = WMCreateSmartyObject(); var param = { MY_NAME1:GLOBAL_MY_NAME1, MY_NAME2:GLOBAL_MY_NAME2, LANG_NAME:LANGUAGE_NAME, BOARD

ckeditor dialog positioning

陌路散爱 提交于 2020-01-11 08:13:07
问题 Dialog windows for CKEditor by default appear in the middle of the page but if the page is an iframe with a big height the dialogs appear way down the page. Is it possible to configure CKEditor to position the dialogs in a different quadrant of the page? For example top middle? 回答1: Yes, the link MDaubs gives will guide you to do what you want. I've had to do this in the past and the following snippet will demonstrate a solution for your problem: CKEDITOR.on('dialogDefinition', function(e) {

How to use setOnPreferenceChangeListener for QuietlyCoding NumberPicker?

久未见 提交于 2020-01-11 06:55:08
问题 I want to detect when the value from the NumberPicker is changed. I have this code on my PreferenceActivity : public class MainPrefs extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.addPreferencesFromResource(R.xml.main_preferences); this.findPreference("SMSSentLimit").setOnPreferenceChangeListener( new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object

Can you access standard Windows strings like 'Cancel'?

北城以北 提交于 2020-01-11 04:28:05
问题 I am building a Windows dialog box that has the standard 'OK' and 'Cancel' buttons. Given that Windows uses the same button text in its own dialogs is there a way for me to grab the correct strings to use on the buttons? This way my application will have the correct strings no matter which language is being used, without me needing to localize it for lots of different languages myself. I am using C# but can happily use platform invoke to access an OS method if needed. NOTE: Yes, I can easily

BottomSheetDialog/BottomSheetDialogFragment — which to use and how?

纵饮孤独 提交于 2020-01-10 20:24:23
问题 I'm working on a Material design app. One feature I want to implement is some kind of a poll. When a user clicks an element of a list, the persistent bottom sheet dialog, which looks like this should show up: Then, when user clicks any button, this dialog should go away and the modal bottom sheet dialog should show up, providing a user with more information about the list item which was clicked at the beginning. It looks like this: I can't find any clear explanations about BottomSheetDialog

How to close/cancel/dismiss a System Dialog programmatically (Android)

心不动则不痛 提交于 2020-01-10 14:19:27
问题 I have an app that make USSD calls, but after all USSD calls i got a dialog with the result to the user. I know that is possible to dismiss this dialog because the "USSD Checker" app do this, they get the response from USSD without showing the user dialog. In the phone utils class Has the function displayMMIComplete that after complete the Ussd call, show a TYPE_SYSTEM_DIALOG . In the PhoneUtils.java they use the dialog like this: AlertDialog newDialog = new AlertDialog.Builder(context)

MonkeyRunner Class

▼魔方 西西 提交于 2020-01-10 09:53:00
A monkeyrunner class that contains static utility methods. 一个包含静态工具方法的类. Public Methods string alert ( string message, string title, string okTitle)    Displays an alert dialog to the process running the current program. The dialog is modal, so the program pauses until the user clicks the dialog's button.   显示一个在当前程序出现的alert对话框, 这是个模式对话框, 所以程序暂停到用户点击对话框上的按钮.(对话框可以分为模式对话框和非模式对话框两种。模式对话框是指用户   只能在当前的窗体中进行操作,在该窗体没有关闭之前不能切换到其他的窗体。非模式对话框是指当前的所操作的窗体可以切换。)   Arguments      message The message to display in the dialog.             对话框上显示的信息.      title   The dialog's title. The default value is "Alert

How can I show my activity as a dialog in Android?

谁说胖子不能爱 提交于 2020-01-10 02:49:25
问题 I am working on my first Android application, and am trying to style my activity. Ultimately, I would like for my activity to look the same as a dialog. I have given all my activities the Theme.Dialog style using the following code in my AndroidManifest.xml : <application android:icon="@drawable/group" android:label="@string/app_name" android:theme="@android:style/Theme.Dialog"> </application> This gives my activities the "floating" appearance and the borders of a dialog, but not the styled

How to remove page background for Jquery Mobile Dialog?

£可爱£侵袭症+ 提交于 2020-01-10 02:04:30
问题 The dialog itself only occupies about 10% of the page and I wanted to remove or turn the dialog's page background into transparent so that the previous page will still be visible. This is the js that calls the dialog: $.mobile.changePage('#popdiv',{transition:'slide', role:'dialog'}); and this is the div <div data-role="page" id="popdiv" data-role="page" data-theme="e"> <div data-role="content"> <h1>Congrats!</h1> </div> </div> I tried using custom css but it doesn't seem to change anything