Assigning Back button event to form button in android - android-emulator

i have a form button in the form,which i need to perform basic action performed by the back button in the android emulator.
I know the key even is KeyEvent.KEYCODE_BACK
how to assign this to my button.
thanks in advance.

The question isn't totally clear, but you probably just want to call finish() when your Button is clicked.

I found the solution to it.
call the function moveTaskToBack(true);
to get back to previous task.

Related

My click trigger always fire in google tag manager

I'm having difficulties using the Click trigger in google tag manager.
I want to setup a trigger to fire on a click event, only when the element class contain "scrollto".
But the thing is, it keeps firing up even when the "scrollto" class isn't part of the element I clicked on.
Here are a few screenshot I hope will help you understand the problem:
Thank you for your help,
Alexis
Ones you set up any click trigger you will get these events everytime a user makes a click but that doesnt mean the trigger it self is being fired. You can append the trigger to any tag and you ll see that if you click anywhere else the tag wont fire even when you see the event.
Hope it helps!
Instead of click classes contains scrollto,
Give click classes equals scrollto

Enabling and Disabling GUI button Matlab

This is a very strange problem, because I am quite sure the logic is proper but it is still not working. So when the GUI starts, in the starting function, I set most of the buttons to be inactivated using the following line of code for every button, Kbutton, Bbutton etc..:
set(handles.Kbutton,'Enable','off');
set(handles.Bbutton,'Enable','off');
Then, when the user clicks on any cell in the uitable, I use the cell selection callback to get the info about the contents of the cell, and re-activate the buttons that can be used from then on:
set(handles.Kbutton,'Enable','on');
set(handles.Bbutton,'Enable','on');
And till now everything is ok.
So then the user clicks on a button, say Kbutton, and the underlying function is executed thanks to the button's callback function. Once the method is ready I would like to return the buttons to their initial state i.e. inactivated. So logic tells me, re-put the initial line of code at the end of the callback function and done:
set(hObject,'Enable','off');
drawnow;
set(handles.BButton,'Enable','off');
drawnow;
Where the first line of code in the above snippet, refers to the button who fired the callback and BButton is any other button in the GUI.
For some strange reason only the second one is being enabled off. I.e. the button that fired the callback is staying enabled on :/
Has anyone encountered the same problem?
Any ideas?
Thanks in advance
Try changing
set(hObject,'Enable','off');
to
set(handles.Kbutton,'Enable','off');
You click on tools =>gui options =>Generate FlG file and MATLAB file

How to press a button with java-script event inside a web-page by code for iOS (iPhone)?

I am writing an application for iOS (iPhone).
How to press a button with java-script event inside a web-page? I need to write a code to press this button. Then the event will be executed. And I'll take result of it's work.
Thanks a lot for help!
You can use:
document.getElementById('id-of-button').click();
This will perform a click event on the button.
EDIT: to run JavaScript in a UIWebView use the stringByEvaluatingJavaScript: method. Eg:
[webView stringByEvaluatingJavaScript:#"document.getElementById('id-of-button').click();"];

disable back button on in ltk wizardinputpage

I'm doing a plugin in Eclipse IDE in order to do a refactoring. I'm using LTK, the point is: I don't know how I can disabled the back button after the preview. I've tried to create the RefactoringWizard using some flags like 'NO_BACK_BUTTON_ON_STATUS_DIALOG', but I think it is not the rigth way to do it.
The poblem I have in the background is that when I push preview and then push back, and preview again, the preview box shows the change related with the refactoring twice!.
I think the best solution is disabling the back button after the preview because this is the solution I have seen in others plugins.
Sorry because of my English and thanks beforehand.
The method org.eclipse.jface.wizard.WizardDialog#updateButtons disables the back button when currentPage.getPreviousPage() returns null. So, I suggest you to override the method org.eclipse.ltk.ui.refactoring.RefactoringWizard#getPreviousPage to return null.

Cancel button Icefaces with immediate=true

I have a form with save and cancel buttons, cancel button has immediate=true but it doesn't clear the submitted values in the form. I google it and I found this page http://jira.icefaces.org/browse/ICE-1343;jsessionid=2996E8791051E9D6775348E6CE1BC118, it says that the solution is to put an action listener in the cancel button that calls a function that clear the submitted values, it works partially because when I have other tags like panels it doesn't clear them.
Any solution? thanks
Check out the solution presented here : http://www.icefaces.org/JForum/posts/list/13807.page
I personally haven't found a good solution beside the two most obvious ones : manually traverse the UI components and nullify them
We used partialSubmit="true" without setting the immediate attribute to true. This works in Icefaces 1.8.2, but there is one drawback. If the validation failed once, it will be executed always.
With Icefaces 2.x, the suggested way is to use singleSubmit="true", but I haven't tried it.
I use immediate="true" and partialSubmit="true" on cancel and something like this for actionListener
public void cancelPopup(ActionEvent event) {
FacesContext.getCurrentInstance().renderResponse();
}