popup

how to create alertdialog outside of an application?

狂风中的少年 提交于 2019-12-02 09:52:28
I want to create an alertdialog outside of my application. AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(Config_ConstantVariable.latest); builder.setMessage(title); builder.setIcon(R.drawable.push_logo); builder.setCancelable(false) .setPositiveButton(Config_ConstantVariable.alertbtnyes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent intent = new Intent(context, Main_ParticularNewsDetail.class); Bundle bundle = new Bundle(); intent.putExtra("newsid", payload); intent.putExtras(bundle); context

JPanel is added onto other Jpanel on togglebutton Click

落爺英雄遲暮 提交于 2019-12-02 09:51:32
I am trying to make a popup panel which is activated with the help of JToggleButton. I want the JPanel to be added onto the other Jpanel when ToggleButton is selected and hides when the ToggleButton is deselected. I have declared the JToggleButton and used ItemListener. But What is happening is when i select the ToggleButton a panel is created if i deselect and Select it again another JPanel is added again and so on and After 5 clicks , Nothing appears. public static JPanel createDesignButtons(){ designButtonsPanel.setOpaque(false); BoxLayout boxLayout = new BoxLayout(designButtonsPanel,

Positioning / Scrolling problem with Flex popup

℡╲_俬逩灬. 提交于 2019-12-02 09:45:47
问题 I'm trying to work out a specific problem I'm having with positioning in Flex using the PopUpManager. Basically I'm wanting to create a popup which will scroll with the parent container - this is necessary because the parent container is large and if the user's browser window isn't large enough (this will be the case the majority of the time) - they will have to use the scrollbar of the container to scroll down. The problem is that the popup is positioned relative to another component, and it

Pop Menu items with different color

早过忘川 提交于 2019-12-02 09:44:29
On Button Click am showing Pop up Menu with 3 items , But all items are in Black Color (Item Text Color).But I want each item with different color. I tried by applying style: <item name="android:textColorPrimary">@color/blue_text</item> <item name="android:textColorSecondary">@color/bottom_green</item> But It will show all items in blue color. Is it possible to show Pop Up Menu items with different color? Please suggest me. Thank you. Yes it is possible. After inflating your popup menu, For each and every item you can set custom title having customise colour. Here is an example: MenuItem

Display popup for a time period in Excel

被刻印的时光 ゝ 提交于 2019-12-02 09:41:11
问题 I am trying to generate in Excel VBA a popup that automatically closes after a given WaitTime in seconds. I have consulted the thread "VBA Excel macro message box auto close" as well as this and this links. I have tried to apply the method from the StackExchange thread cited; my code is the following: Sub TestSubroutine() Dim TemporalBox As Integer Dim WaitTime As Integer Dim WScriptShell As Object Set WScriptShell = CreateObject("WScript.Shell") WaitTime = 1 TemporalBox = WScriptShell.Popup(

How to center PopupWindow?

房东的猫 提交于 2019-12-02 09:31:54
问题 I created an Activity in which i add a button that throws a popup when is clicked. Here is the code of showPopup() method: private void showPopup() { LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.popup_layout, (ViewGroup) findViewById(R.id.popup_element), false); final PopupWindow pwindo = new PopupWindow(layout, LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, true); Button btnAgree = (Button)

How to create an image map using Java Swing?

风流意气都作罢 提交于 2019-12-02 09:24:55
I need to make an image map using Swing that displays a background image, and then when the mouse hovers over (or clicks) specific hotspots, I need to pop up a 'zoomed-in' image and have it display. I was thinking of extending JPanel to include an image reference and have that drawn thru the paintComponent(g) method. This part I have done so far, and here's the code: public class ImagePanel extends JPanel { private static final long serialVersionUID = 1L; private Image image; public ImagePanel(Image image) { setImage(image); } public void setImage(Image newImage) { image = newImage; }

Storing the Window Object in local storage

久未见 提交于 2019-12-02 07:19:01
问题 I need the ability to persist the window object. I tried to stringify the window object but I received and error when trying to convert the window object to JSON. "Converting circular structure to JSON" error. Is there anyway I can store the window object from a window.open in local store? var myWindow = window.open("file:///D:/Temp/teststorage.html", "MsgWindow", "width=200, height=100"); localStorage.setItem('Window', JSON.stringify(myWindow)); 回答1: You can't persist a window object in

How to center PopupWindow?

荒凉一梦 提交于 2019-12-02 07:17:49
I created an Activity in which i add a button that throws a popup when is clicked. Here is the code of showPopup() method: private void showPopup() { LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.popup_layout, (ViewGroup) findViewById(R.id.popup_element), false); final PopupWindow pwindo = new PopupWindow(layout, LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, true); Button btnAgree = (Button) layout.findViewById(R.id.ok); btnAgree.setOnClickListener(new View.OnClickListener() { public void

auto-complete search suggestion drop-down popup

左心房为你撑大大i 提交于 2019-12-02 07:04:40
问题 Im trying to make a popup div (when a text-box value changes) and it can be closed (visibility: none) by clicking anywhere outside the div. Similar to Google suggestion drop-down. How can I know weather the mouse click has happened inside the div or outside. I need to implement this using javascript and jsp. Please help. 回答1: The jquery solution would be $("body > div").click(function() { if ($(this).attr("id") == "div-id") { // inside the DIV } else { // not inside the DIV } }); or $("html")