button

Android : ImageView getID(); returning integer

≯℡__Kan透↙ 提交于 2020-01-11 15:47:26
问题 I've set up an onTouch class to determine when one of my 40 buttons is pressed. The problem I am facing is determining which button was pressed. If I use: int ID = iv.getId(); When I click on button "widgetA1" I receive the following ID: 2131099684 I would like it to return the string ID "widgetA1" from:game.xml <ImageView android:layout_margin="1dip" android:id="@+id/widgetA1" android:src="@drawable/image" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>

Android : ImageView getID(); returning integer

前提是你 提交于 2020-01-11 15:47:06
问题 I've set up an onTouch class to determine when one of my 40 buttons is pressed. The problem I am facing is determining which button was pressed. If I use: int ID = iv.getId(); When I click on button "widgetA1" I receive the following ID: 2131099684 I would like it to return the string ID "widgetA1" from:game.xml <ImageView android:layout_margin="1dip" android:id="@+id/widgetA1" android:src="@drawable/image" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>

bootstrap button on click showing default colour

风流意气都作罢 提交于 2020-01-11 15:45:45
问题 I am trying to style the button colour with below code, the colours work until I click the button, the button shows the default colours, how do I specify the colours of the button onclick? .btn-success { color: #ffffff; background-color: #161617; border-color: #494F57; } .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open .dropdown-toggle.btn-success { color: #ffffff; background-color: #1F2838; border-color: #494F57; } .btn-success:active, .btn-success

On a button's click event, execute event handler in another class

孤人 提交于 2020-01-11 14:26:13
问题 On a button's click, i want it to execute an event handler method that is another class apart from the window class. I believe creating a ObjectDataProvider object which is binded to the event handler method in the other class, then binding said object to the Click event would do the trick, but it didn't. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows

HTML/CSS Nested Menu Dropdowns

不羁的心 提交于 2020-01-11 14:08:11
问题 I'm don't understand how to create nested dropdowns for a navbar menu. I would like to use buttons and divs (and not lists/links/bootstrap). I built something I think is correct here but of course I can't get it working. Could someone please help me get the dropdown & nested dropdown to work :) .dropdown { background: white; float: left; } .dropdown .dropdown { position: absolute; left: 0; top: 100%; visibility: hidden; opacity: 0; } .dropdown .dropdown .dropdown { left: 100%; top: 0; }

PHP multiple radio buttons

风流意气都作罢 提交于 2020-01-11 13:53:29
问题 how can i process all radio buttons from the page? <input type="radio" name="radio_1" value="some" /> <input type="radio" name="radio_1" value="some other" /> <input type="radio" name="radio_2" value="some" /> <input type="radio" name="radio_2" value="some other" /> this buttons will be added dynamically so i will not know the radio buttons name(and also the number of the buttons). Is there a way to get all radio values, with a for loop or something like this? thanks 回答1: Use a foreach loop <

Disable Submit Button Based on Ajax response

余生颓废 提交于 2020-01-11 13:19:07
问题 Ok in summary what I am trying to do is disable a submit button based on an ajax call which is checking my database to see if data exists under a certain date. At present I have got all of the above working however I am falling at the final hurdle in actually disabling the submit button. At presnt I have the response of my ajax call being displayed as text in a div on my page and I can by altering the code below, disable the button if the response does not match that being checked by my code

disable <button> with jQuery Mobile causes frame

匆匆过客 提交于 2020-01-11 11:21:11
问题 i am using jquery 2.0 with jquery mobile 1.4. if i disable a there is a Frame around the Button. It's still there if i enable the button again. $("#speichern").button({disabled:true}); button tag: <button id="artSave" class="ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all ui-btn-b"> speichern</button> i don't like to use an anchor, because it can't disable the button fully. i also had some drawbacks with picture of frame around the button thanks a lot 回答1: To disable a button or a tags,

How to make modification Android Snackbar containing with LayoutInflater button and editText

霸气de小男生 提交于 2020-01-11 11:08:53
问题 My project now is how to make a Snackbar displayed at the bottom of the screen. The Snackbar contain with editText and three button for selection categories. I use LayoutInflater and follow these code for my script, and it's work. My problem now is, how to get response when user click the button ? Here my code @Override public void onClick(View v) { CoordinatorLayout linearLayout = (CoordinatorLayout)findViewById(R.id.coordinatorLayout); final Snackbar snackbar = Snackbar.make(linearLayout, "

Disable focus for tkinter widgets?

最后都变了- 提交于 2020-01-11 10:46:06
问题 How can I make a widget that will not get the focus ever in tkinter? For example, a button that when I will press TAB the focus will skip on him 回答1: I have found some time to provide a working example: import Tkinter import tkMessageBox root = Tkinter.Tk() but1 = Tkinter.Button(root, text ="Button 1") but1.pack() butNoFocus = Tkinter.Button(root, text ="Button no focus", takefocus = 0) butNoFocus.pack() but2 = Tkinter.Button(root, text = "Button 2") but2.pack() root.mainloop() takefocus