dialog

Android 4.1.2 dialogs are called twice

荒凉一梦 提交于 2020-01-02 00:49:09
问题 I have this issue with my app when I call to show a dialog, it is being called twice somehow. This only happens with android 4.1 and above. Lower version works fine so I dont think it's any code issue. Did you heard\encountered this issue before? here the code: Button edit = (Button) ad.findViewById(R.id.editBtn); edit.setTypeface(roboto); edit.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { setDate(); ad.dismiss(); } }); ad.show(); ad.setOnDismissListener

Single ESC closes ALL modal dialogs in jQuery UI. Workarounds?

五迷三道 提交于 2020-01-01 11:48:29
问题 Actually, there was (is still) a bug in jQuery: http://bugs.jqueryui.com/ticket/4511. The reason for this behavior (from the bug description comments): "The dialog itself binds keydown event to itself for closing the dialog on ESC ; in addition, the dialog overlay binds a keydown event to the document, without filtering to close only the active dialog." I cannot come up with an idea of an acceptable workaround. Is there anyone who has had to deal with it yet? 回答1: Very simple - upon creating

AlertDialog custom title has black border

人盡茶涼 提交于 2020-01-01 11:00:09
问题 I have an AlertDialog that I use a custom dialog view with. The idea of the custom title view seems simple enough, but there is a black border around the custom title that I can't seem to get rid of. The top, left and right sides have a single-pixel border, while the bottom side has about a 5 pixel border. Creating the dialog in Java: View titleView = inflater.inflate(R.layout.part_list_item, parent, false); ((TextView) titleView.findViewById(R.id.partName)).setText(titleText); AlertDialog

Play video in dialog box android

我与影子孤独终老i 提交于 2020-01-01 08:52:53
问题 I want to play a video in a dialog box which appears when an image is clicked. The video does not play and the app crashes. Here is my code: image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub // custom dialog final Dialog dialog = new Dialog(context); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.introvid); dialog.show(); WindowManager.LayoutParams lp = new WindowManager

Play video in dialog box android

我只是一个虾纸丫 提交于 2020-01-01 08:51:59
问题 I want to play a video in a dialog box which appears when an image is clicked. The video does not play and the app crashes. Here is my code: image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub // custom dialog final Dialog dialog = new Dialog(context); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.introvid); dialog.show(); WindowManager.LayoutParams lp = new WindowManager

ElementListSelectionDialog has no elements

你离开我真会死。 提交于 2020-01-01 06:13:34
问题 I'm trying to use a ElementListSelectionDialog. I've followed the example code but for whatever reason the dialog show but with no options My Code: ElementListSelectionDialog dialog = new ElementListSelectionDialog(shlSpriteCreator, new LabelProvider()); dialog.setMultipleSelection(false); dialog.setIgnoreCase(true); dialog.setAllowDuplicates(true); dialog.setMessage("Select an AI"); dialog.setTitle("What AI to use?"); dialog.setElements(new String[]{"HELLO","GOODBYE"}); if (dialog.open() ==

FB.ui feed dialog requires redirect_uri, dialog does not close

♀尐吖头ヾ 提交于 2020-01-01 03:37:18
问题 I am trying to open a feed dialog using the JS SDK's FB.ui method and have it close after the user shares. My problem is the feed dialog is requiring a redirect_uri even though the documentation says it doesn't have to be defined, and the popup window redirects there and will not close like the callback function says. Here's my code, attached to the submit click event: FB.ui ( { method: 'feed', name: 'xxx!', link: 'link to FB tab', picture: 'jpg', caption: 'xxx', actions: {name:'xxx',link:

Android: make everything around Dialog darker than default

痞子三分冷 提交于 2020-01-01 02:27:07
问题 i have a custom dialog with following style: <style name="webtogo_app_style" parent="@android:style/Theme.Dialog"> <item name="android:windowNoTitle">true</item> <item name="android:windowBackground">@android:color/transparent</item> </style> It shows a borderless dialog, and anything behind gets (slightly) darker. My designer wants that everything behind got ever more dark than Android's default, but not completely black. Is there a setting for this at all? The only workaround I can think of

How do I close the popup after I post to facebook?

北城余情 提交于 2019-12-31 22:28:26
问题 On our blog we have a link where users can post our articles to their timeline. A popup opens up and the user posts to facebook, then the popup stays there and redirects to "www.oursite.com". How do we instead close the popup when the user either finishes posting or clicks on the cancel button? According to this so question it can't be done but Huffington post has figured it out but looking at their code we can't figure it out. As an example, the facebook share button here will open up a

手游SDK-登录界面

北战南征 提交于 2019-12-31 13:00:07
登录界面可以通过自定义Dialog来实现。 一、登录界面基本Dialog 继承Dialog后有三个构造函数,不一定要都实现,但必须实现一个构造函数。这三个构造函数的作用如下: BaseView(Context context) : 单纯的传入Context,最常用。在代码中通过new来获得Dialog实例,然后使用show()展示。 BaseView(Context context, int themeResId) : themeResId为主题值,可以传入一个主题值,比如:R.style.XXX,让Dialog使用所设置的主题。 BaseView(Context context, boolean cancelable, OnCancelListener cancelListener) : cancelable 点击Dialog以外的地方是否取消Dialog,为false是点击Dialog以外的地方不消失。其实这个就等同于平常使用的setCanceledOnTouchOutside(false)。 cancelListener:当cancelable为true时才起作用。点击Dialog以外的地方时会调用cancelListener,可以在cancelListener里面做相应的监听事件。 先写一个最基本的登录界面的框架Dialog。 示例代码: public class