0
我有一個視圖(Tabhost),我想要顯示它,當我點擊一個按鈕,當我顯示thw Tabhost我隱藏軟鍵盤,如果我選擇相同的按鈕,我想顯示軟鍵盤並隱藏了Tabhost,我的鱈魚點擊波紋管,但它沒有像我想要的行爲..任何身體可以幫助!?隱藏視圖和顯示軟鍵盤
public void show_smily(View view) { // event habdler
EditText composer = (EditText) findViewById(R.id.message_composer);
InputMethodManager imm = (InputMethodManager)getSystemService(
Context.INPUT_METHOD_SERVICE);
TabHost tabHost = (TabHost)findViewById(R.id.tabHost);
if(!tabHost.isShown()) {
imm.hideSoftInputFromWindow(composer.getWindowToken(),0);
tabHost.setVisibility(View.VISIBLE);
}
if(tabHost.isShown()) {
tabHost.setVisibility(View.GONE);
imm.showSoftInput(composer,0);
}
}