dialog

How do I maintain the Immersive Mode in Dialogs?

廉价感情. 提交于 2019-12-17 05:25:29
问题 How do I maintain the new Immersive Mode when my activities display a custom Dialog? I am using the code below to maintain the Immersive Mode in Dialogs, but with that solution, the NavBar appears for less than a second when I start my custom Dialog, then it disappears. The following video explains the issue better (look at the bottom of the screen when the NavBar appears): http://youtu.be/epnd5ghey8g How do I avoid this behavior? CODE The father of all activities in my application: public

How do I maintain the Immersive Mode in Dialogs?

自古美人都是妖i 提交于 2019-12-17 05:25:05
问题 How do I maintain the new Immersive Mode when my activities display a custom Dialog? I am using the code below to maintain the Immersive Mode in Dialogs, but with that solution, the NavBar appears for less than a second when I start my custom Dialog, then it disappears. The following video explains the issue better (look at the bottom of the screen when the NavBar appears): http://youtu.be/epnd5ghey8g How do I avoid this behavior? CODE The father of all activities in my application: public

Android: How to create a Dialog without a title?

青春壹個敷衍的年華 提交于 2019-12-17 02:34:08
问题 I'm trying to generate a custom dialog in Android. I create my Dialog like this: dialog = new Dialog(this); dialog.setContentView(R.layout.my_dialog); Everythings works fine except for the title of the Dialog. Even if I don't set the title of the dialog the dialog popup has a blank space at the position of the dialog. Is there any way to hide this part of the Dialog? I tried it with an AlertDialog but it seems the layout is not set properly: LayoutInflater inflater = (LayoutInflater) this

Animate a custom Dialog

帅比萌擦擦* 提交于 2019-12-17 02:19:06
问题 I'm trying to have a custom dialog appear as though it's sliding down from a text view. Is this possible? I can't seem to apply any animation to dialog class. I've tried this line in the constructor, but it has no effect: this.getWindow().setWindowAnimations(R.anim.paranimation); I'm not even sure if the animation is correct, but I will be able adjust it once I see what it's doing. I'll list it below for the sake of completeness. I'm not looking for help on the actual animation, just the

Choosing a file in Python with simple Dialog

北战南征 提交于 2019-12-17 02:05:14
问题 I would like to get file path as input in my Python console application. Currently I can only ask for full path as an input in the console. Is there a way to trigger a simple user interface where users can select file instead of typing the full path? 回答1: How about using tkinter? from Tkinter import Tk from tkinter.filedialog import askopenfilename Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing filename = askopenfilename() # show an "Open" dialog box and

Shell编程—图形化脚本

允我心安 提交于 2019-12-15 21:41:04
1 创建文本菜单 1.1 普通的文本菜单 $ cat menu1 #!/bin/bash # simple script menu function diskspace { clear df -k } function whoseon { clear who } function memusage { clear cat /proc/meminfo } function memu{ clear echo echo -e "\t\t\tSys Admin Menu\n" echo -e "\t1. Display disk space" echo -e "\t2. Display logged on users" echo -e "\t3. Display memory usage" echo -e "\t0. Exit program\n\n" echo -en "\t\tEnter option: " read -n 1 option } while [ 1 ] do menu case $option in 0) break ;; 1) diskspace ;; 2) whoseon ;; 3) memusage ;; *) clear echo "Sorry, wrong selection";; esac echo -en "\n\n\t\t\tHit any key to

Showing dialog on top of another running activity (Android)?

谁说我不能喝 提交于 2019-12-14 03:58:52
问题 I've created an application that works with another app on the Android platform. The other application passes my app information, with intents, based on user action. I was hoping, that I might be able to pop a translucent information dialog, on top of the other application. I followed one of the examples, here, but it brought my application back to the foreground and put the dialog on top of that. Is this possible? I'm hoping to avoid having to work with the other developers to set up intent

How to adjust size of BottomSheet with Edittext and button below it?

♀尐吖头ヾ 提交于 2019-12-14 03:58:12
问题 I want to build a BottomSheet to display a view with button and edit text. If I click on the Edittext the Keyboard shows up but it hides the button which is below the edit text. These pics should show my problems 1)BottomSheet in normal view-First Image 2)BottomSheet hides the button- Second Image Here is my code for creating BottomSheet addNewListBottomSheet = new BottomSheetDialog(this, R.style.BottomSheetDialogTheme); View bottomSheetRootView = getLayoutInflater().inflate(R.layout

MVVM, DialogService and Dialog Result

与世无争的帅哥 提交于 2019-12-14 03:53:05
问题 I'm currently learning WPF/MVVM, and have been using the code in the following question to display dialogs using a Dialog Service (including the boolean change from Julian Dominguez): Good or bad practice for Dialogs in wpf with MVVM? Displaying a dialog works well, but the dialog result is always false despite the fact that the dialog is actually being shown. My DialogViewModel is currently empty, and I think that maybe I need to "hook up" my DialogViewModel to the RequestCloseDialog event.

Stopping the DatePickerDialog from closing when use clicks the Set button

梦想与她 提交于 2019-12-14 03:47:47
问题 I've implemented a DatePickerDialog using the example shown here. In my implementation of the DatePickerDialog.OnDateSetListener I added validation logic to check that the selected date is within specific range. private final DatePickerDialog.OnDateSetListener dateSetListener = new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int y, int m, int d) { final Calendar calendar = Calendar.getInstance(); calendar.set(y, m, d); Date date = calendar.getTime()