java noob here,我只是想知道如何在一个方法中运行 2 个函数?我已经尝试过switch case,但它并没有达到我的想法......
我想包括这两个代码 -
detachThread();
RFBThread persistentRfbThread = this.rfbThread;
this.rfbThread = null;
return persistentRfbThread;
和这个-
if (_listeningDialog.isShowing() && _currentRecognizer != null)
{
// If a recognition is in progress, save it, because the activity
// is about to be destroyed and recreated
SavedState savedState = new SavedState();
savedState.Recognizer = _currentRecognizer;
savedState.DialogText = _listeningDialog.getText();
savedState.DialogLevel = _listeningDialog.getLevel();
savedState.DialogRecording = _listeningDialog.isRecording();
savedState.Handler = _handler;
_currentRecognizer = null; // Prevent onDestroy() from canceling
return savedState;
}
return null;
在这里-
public Object onRetainNonConfigurationInstance() {
}
什么是正确的方法?
非常感谢 :)