Bug 880650 - Clean up hiding/showing VKB in the awesome screen. r=cpeterson

This commit is contained in:
Jim Chen 2013-06-11 21:41:22 -04:00
parent 432f0bc4ad
commit fc64f9dcb8
4 changed files with 3 additions and 9 deletions

View File

@ -228,7 +228,7 @@
<activity android:name="org.mozilla.gecko.AwesomeBar"
android:theme="@style/Gecko.AwesomeBar"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateAlwaysVisible|adjustResize"/>
android:windowSoftInputMode="stateUnspecified|adjustResize"/>
<activity android:name="org.mozilla.gecko.GeckoPreferences"
android:theme="@style/Gecko.Preferences"

View File

@ -121,8 +121,6 @@ public class AwesomeBar extends GeckoActivity
mText.setText(text);
mText.setSelection(mText.getText().length());
mText.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mText, InputMethodManager.SHOW_IMPLICIT);
}
});
}
@ -146,7 +144,6 @@ public class AwesomeBar extends GeckoActivity
String currentUrl = intent.getStringExtra(CURRENT_URL_KEY);
if (currentUrl != null) {
mText.setText(currentUrl);
mText.selectAll();
}
mTarget = intent.getStringExtra(TARGET_KEY);
@ -220,7 +217,8 @@ public class AwesomeBar extends GeckoActivity
return;
}
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
try {
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
} catch (NullPointerException e) {
@ -471,8 +469,6 @@ public class AwesomeBar extends GeckoActivity
} else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
mText.setText("");
mText.requestFocus();
InputMethodManager imm = (InputMethodManager) mText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mText, InputMethodManager.SHOW_IMPLICIT);
return true;
} else {
int prevSelStart = mText.getSelectionStart();

View File

@ -16,7 +16,6 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.TabHost;
import android.widget.TabWidget;

View File

@ -41,7 +41,6 @@
android:singleLine="true"
android:gravity="center_vertical|left"
gecko:autoUpdateTheme="false">
<requestFocus/>
</view>
<LinearLayout android:layout_width="4dp"