popupwindow

Exception when try to setError() in an editText inside a Popup Window

我们两清 提交于 2020-01-15 13:36:33
问题 This is my code: if(textNomeGiocatore.getText().toString().equals("")){ InputMethodManager imm = (InputMethodManager)getSystemService( Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(textNomeGiocatore.getWindowToken(), 0); textNomeGiocatore.setError("Nome giocatore necessario"); } I have an error in the row : textNomeGiocatore.setError("Nome giocatore necessario"); this is the error : android.view.WindowManager$BadTokenException: Unable to add window -- token android.view

Exception when try to setError() in an editText inside a Popup Window

六月ゝ 毕业季﹏ 提交于 2020-01-15 13:36:09
问题 This is my code: if(textNomeGiocatore.getText().toString().equals("")){ InputMethodManager imm = (InputMethodManager)getSystemService( Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(textNomeGiocatore.getWindowToken(), 0); textNomeGiocatore.setError("Nome giocatore necessario"); } I have an error in the row : textNomeGiocatore.setError("Nome giocatore necessario"); this is the error : android.view.WindowManager$BadTokenException: Unable to add window -- token android.view

Android学习日志2020-1-14

烂漫一生 提交于 2020-01-14 20:37:13
接收验证码用的倒计时 如果需要在倒计时时对ui组件进行操作,像接收手机验证码时的倒计时,不能新建普通进程,产生错误,例如thread之类。 android.util.AndroidRuntimeException: Animators may only be run on Looper threads //子线程内不可改变ui 一个可以用于计时的类,也可以处理固定时间并且要在固定时间间隔刷新的操作。这个类叫做CountDownTimer,idea中点击类名可以查看详细信息: /** * Schedule a countdown until a time in the future, with * regular notifications on intervals along the way. * * Example of showing a 30 second countdown in a text field: * * <pre class="prettyprint"> * new CountDownTimer(30000, 1000) { * * public void onTick(long millisUntilFinished) { * mTextField.setText("seconds remaining: " + millisUntilFinished /

Popup window Maximize button

假如想象 提交于 2020-01-14 18:45:45
问题 How to enable the maximize and restore button of the popup window using Javascript? 回答1: Using the code I pasted on the bottom, you can emulate these buttons by creating them in your website interface. To maximise: save the current position with Namespace.outerPositionGet() and size with Namespace.outerSizeGet() , then do Namespace.outerPositionSet({left:0,top:0}) and Namespace.outerSizeSet({width:window.screen.availWidth, height:window.screen.availHeight}) . To restore: just set position and

How to create a Spinner widget inside of a PopupWindow in Android? Get BadTokenException when clicking on Spinner

偶尔善良 提交于 2020-01-14 05:10:50
问题 I've been searching the web for the solution to this problem, but, unfortunately, I can't seem to find the answer. I created an XML file for a PopupWindow with a Spinner inside of it. Inside a button event listener, I call the following code to inflate the PopupWindow and display it on the screen. LayoutInflater inflater = getLayoutInflater(); settings_layout = inflater.inflate(R.layout.setting_popout, (ViewGroup) findViewById(R.id.setting_popout)); // Creates a popup window of required width

angular event success when submit form it opens popup

我的梦境 提交于 2020-01-13 11:05:13
问题 I have a page which post data to a ASPNET MVC page by angular $http.post(..) and when the calling finish I have to submit a form. Basically I do the following: <html ng-app> <body data-ng-controller="testController"> <form id="Checkpay" name="Checkpay" style="margin: 0" method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" target="_blank" class="ng-pristine ng-valid"> <input type="hidden" name="quantita" id="qtytext" value="0"> <input type="hidden" name="cmd" value="_xclick">

Java - Right Clicking JTabbledPane Tab

拟墨画扇 提交于 2020-01-10 05:38:06
问题 I have it working, however the popup menu appears when you right click anywhere inside the tab. I only would like it to appear when you right click the top of the tab (the name). I cannot figure out how to do this. Any help is appreciated. Thanks. 回答1: Try adding your popup to the custom component demonstrated in TabComponentsDemo. 来源: https://stackoverflow.com/questions/9220889/java-right-clicking-jtabbledpane-tab

Add a UIView above all, even the navigation bar

与世无争的帅哥 提交于 2020-01-08 18:21:40
问题 I want to display, above any other views, even the navigation bar, a kind of "pop-up" view that looks like this: full screen black background with a 0.5 alpha to see the other UIViewController underneath. a UIView window in the middle with some information, (a calendar if you want to know everything). To do that, I've created a UIViewController that contains the two UIViews (background and window), and I'm trying to display it. I've tried a simple [mySuperVC addSubview:myPopUpVC.view] , but I

Add a UIView above all, even the navigation bar

若如初见. 提交于 2020-01-08 18:20:38
问题 I want to display, above any other views, even the navigation bar, a kind of "pop-up" view that looks like this: full screen black background with a 0.5 alpha to see the other UIViewController underneath. a UIView window in the middle with some information, (a calendar if you want to know everything). To do that, I've created a UIViewController that contains the two UIViews (background and window), and I'm trying to display it. I've tried a simple [mySuperVC addSubview:myPopUpVC.view] , but I

Add a UIView above all, even the navigation bar

回眸只為那壹抹淺笑 提交于 2020-01-08 18:20:11
问题 I want to display, above any other views, even the navigation bar, a kind of "pop-up" view that looks like this: full screen black background with a 0.5 alpha to see the other UIViewController underneath. a UIView window in the middle with some information, (a calendar if you want to know everything). To do that, I've created a UIViewController that contains the two UIViews (background and window), and I'm trying to display it. I've tried a simple [mySuperVC addSubview:myPopUpVC.view] , but I