2016-11-23 97 views

回答

0

如果您關閉在Android與Android的後退按鈕鍵盤我想你將不得不檢測按下該按鈕或檢測時鍵盤已經消失。要檢查鍵盤:

import { 
    Keyboard 
} from 'react-native'; 

class MyClass extends Component{ 
    //... 
    componentDidMount() { 
     Keyboard.addListener('keyboardDidHide', callback) 
    } 
    //... 
} 

而在你的回調,那麼你可以調用this.refs.yourInput.blur();

如果你想與detecting the Backbutton-Press嘗試一下,但我不知道是否適合檢測鍵盤消失。

相關問題