Пример #1
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.find_prev:
       GeckoAppShell.sendEventToGecko(
           GeckoEvent.createBroadcastEvent("FindInPage:Prev", mFindText.getText().toString()));
       getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
       break;
     case R.id.find_next:
       GeckoAppShell.sendEventToGecko(
           GeckoEvent.createBroadcastEvent("FindInPage:Next", mFindText.getText().toString()));
       getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
       break;
     case R.id.find_close:
       hide();
       break;
   }
 }
Пример #2
0
 public void hide() {
   setVisibility(GONE);
   getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
   GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FindInPage:Closed", null));
 }