2011-01-11 8 views

Antwort

0

Haben Sie in der überschriebenen Methode super.onConfigurationChanged(newConfig); hinzugefügt?

1

das Datum beobachten, möglicherweise haben Sie eine Lösung für Ihre Frage, sonst:

Hier ist die gleiche Antwort, die ich auf eine andere Frage im Zusammenhang hergestellt: Is there a way to tell if the soft-keyboard is shown?

aber ich kopieren Sie einen Teil der Antwort hier tote Links vermeiden: Hier

ist eine spezifische Probe:

prüfen für ein besseres Verständnis http://developer.android.com/guide/topics/resources/runtime-changes.html

 
@Override 
public void onConfigurationChanged(Configuration newConfig) { 
    super.onConfigurationChanged(newConfig); 

    // Checks the orientation of the screen 
    if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { 
     Toast.makeText(this, "landscape", Toast.LENGTH_SHORT).show(); 
    } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){ 
     Toast.makeText(this, "portrait", Toast.LENGTH_SHORT).show(); 
    } 
    // Checks whether a hardware keyboard is available 
    if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) { 
     Toast.makeText(this, "keyboard visible", Toast.LENGTH_SHORT).show(); 
    } else if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) { 
     Toast.makeText(this, "keyboard hidden", Toast.LENGTH_SHORT).show(); 
    } 
} 

Ich hoffe, das hilft Ihnen

+0

Softkeyboard Show/Hide nie onConfigurationChanged auslösen() – fantouch

Verwandte Themen