dialog

How to Hide Navigation Bar When Using Full Screen Dialog

非 Y 不嫁゛ 提交于 2020-05-11 03:29:21
问题 I am using a full-screen ‍ Dialog to show ExoPlayer video in full screen mode. I am already using the following code in the onCreate method of the Activity hosting the Dialog to hide the Navigation Bar . public class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Hide the navigation bar in the beginning final View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG

Bad window token, you cannot show a dialog before an Activity is created or after it's hidden

谁都会走 提交于 2020-05-09 20:06:42
问题 I am using an AppIntro library in my app. It has 3 slides. I want to ask the user something when the third slide is shown. To achieve that I am using material dialogs by afollestad. My code in the AppIntro Activity looks like that: @Override public void onNextPressed() { if(this.pager.getCurrentItem() == 2) { MaterialDialog dialog = new MaterialDialog.Builder(getApplicationContext()) .title("QR Code scannen") .content("Möchtest du den QR Code scannen oder selbst eingeben?") .positiveText(

Bad window token, you cannot show a dialog before an Activity is created or after it's hidden

醉酒当歌 提交于 2020-05-09 20:06:03
问题 I am using an AppIntro library in my app. It has 3 slides. I want to ask the user something when the third slide is shown. To achieve that I am using material dialogs by afollestad. My code in the AppIntro Activity looks like that: @Override public void onNextPressed() { if(this.pager.getCurrentItem() == 2) { MaterialDialog dialog = new MaterialDialog.Builder(getApplicationContext()) .title("QR Code scannen") .content("Möchtest du den QR Code scannen oder selbst eingeben?") .positiveText(

Bad window token, you cannot show a dialog before an Activity is created or after it's hidden

我的未来我决定 提交于 2020-05-09 20:06:00
问题 I am using an AppIntro library in my app. It has 3 slides. I want to ask the user something when the third slide is shown. To achieve that I am using material dialogs by afollestad. My code in the AppIntro Activity looks like that: @Override public void onNextPressed() { if(this.pager.getCurrentItem() == 2) { MaterialDialog dialog = new MaterialDialog.Builder(getApplicationContext()) .title("QR Code scannen") .content("Möchtest du den QR Code scannen oder selbst eingeben?") .positiveText(

Electron Dialog saving file not working

微笑、不失礼 提交于 2020-05-09 06:46:32
问题 Electron version: 1.3.3 Operating system: Ubuntu 14.04 I want to save a XML object into a .xml file with Electron. I try this: const {dialog} = require("electron").remote; dialog.showSaveDialog(myObj) A new windows is opening, I fill the name of the file but nothing has been saving. 回答1: The showSaveDialog() API does not save the file for you. You must use the returned path and use Node to save your file. const {dialog} = require("electron").remote; const fs = require('fs'); var savePath =

Flutter Screen Recording Dialog Press

六眼飞鱼酱① 提交于 2020-05-07 09:19:08
问题 How can I detect which button is pressed "start now" or "cancel" to change some design by pressing them. The dialog open by this line of code, FlutterScreenRecording.startRecordScreen("file.mp4"); 回答1: Have some boolen variable in your state. and on click of start now call setState function as below : setState(() { startRecording = true; }) where you want to show changes check whether it has become true or not. On true do the changes otherwise nothing will happen. 来源: https://stackoverflow

Flutter Screen Recording Dialog Press

本秂侑毒 提交于 2020-05-07 09:18:17
问题 How can I detect which button is pressed "start now" or "cancel" to change some design by pressing them. The dialog open by this line of code, FlutterScreenRecording.startRecordScreen("file.mp4"); 回答1: Have some boolen variable in your state. and on click of start now call setState function as below : setState(() { startRecording = true; }) where you want to show changes check whether it has become true or not. On true do the changes otherwise nothing will happen. 来源: https://stackoverflow

onDateSet isn't getting called in android 5.1.1

无人久伴 提交于 2020-04-18 05:46:32
问题 I have a date picker dialog which works perfectly on android 9 and android 10, I decided to test on android 5.1.1, and after selecting a date, nothing happens, the onDateSet() doesn't fire up, I've read at least 10 articles on SO that refer to similar problems, but can't find a working solution Here's my code, maybe someone could point out what i'm doing wrong DateDialog.java public class DateDialog extends DialogFragment { DatePickerDialog.OnDateSetListener mOnDateSetListener; public static

第四篇 -- 信号与槽的使用

跟風遠走 提交于 2020-04-06 16:54:48
学习书籍《Python Qt GUI与数据可视化编程》 一、信号与槽功能概述 信号(Signal):就是在特定情况下被发射(emit)的一种通告,例如一个PushButton按钮最常见的信号就是鼠标单击时发射的clicked()信号,一个ComboBox最常见的信号是选择的项变化时发射的CurrentIndexChanged()信号。GUI程序设计的主要内容就是对界面上各组件发射的特定信号进行响应,只需要知道什么情况下发射了哪些信号,然后合理地去响应和处理这些信号就可以了。 槽(Slot):就是对信号响应的函数。槽实质上是一个函数,它可以被直接调用。槽函数与一般的函数不同的是:槽函数可以与一个信号关联,当信号被发射时,关联的槽函数会被自动执行。Qt的类一般都有一些内建(build-in)的槽函数,例如QWidget有一个槽函数close(),其功能是关闭窗口。如果将一个PushButton按钮的clicked()信号与窗体的close()槽函数关联,那么点击按钮时就会关闭窗口。 二、组件的信号与内建槽函数的关联 1. 先画一个图 属性设置表格如下: 对象名 类名称 属性设置 功能 Dialog QDialog windowTitle="Demo2-3信号与槽" 窗体的类名称是Dialog,objectName不要修改 textEdit QPlainTextEdit Text=

小程序中自定义组件

左心房为你撑大大i 提交于 2020-03-27 02:38:35
之前做小程序开发的时候,对于开发来说比较头疼的莫过于自定义组件了,当时官方对这方面的文档也只是寥寥几句,一笔带过而已,所以写起来真的是非常非常痛苦!! 好在微信小程序的库从 1.6.3 开始,官方对于自定义组件这一块有了比较大的变动,首先比较明显的感觉就是文档比以前全多了,有木有!(小程序文档),现在小程序支持简洁的组件化编程,可以将页面内的功能模块抽象成自定义组件,以便在不同的页面中复用,提高自己代码的可读性,降低自己维护代码的成本! 本篇文章就是手把手教你实现小程序中自定义组件,坐稳啦~ 具体实现 要做自定义组件,我们先定一个小目标,比如说我们在小程序中实现一下 WEUI 中的弹窗组件,基本效果图如下。 Step1 我们初始化一个小程序(本示例基础版本库为 1.7 ),删掉里面的示例代码,并新建一个 components 文件夹,用于存放我们以后开发中的所用组件,今天我们的目的是实现一个 弹框 组件,因此,我们在 components 组件中新建一个 Dialog 文件夹来存放我们的弹窗组件,在 Dialog 下右击新建 Component 并命名为 dialog 后,会生成对应的 json wxml wxss js 4个文件,也就是一个自定义组件的组成部分,此时你的项目结构应该如下图所示: Step2 组件初始化工作准备完成,接下来就是组件的相关配置