Android BaseInputConnection - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android BaseInputConnection class.

This code example shows how to use the following methods: sendKeyEvent, sleep
      assertTrue(url.endsWith("sample2.html"));
      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("sample3.html"));
      BaseInputConnection viewConnection = new BaseInputConnection(testView, true);
      KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
      KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
      viewConnection.sendKeyEvent(backDown);
      viewConnection.sendKeyEvent(backUp);
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("sample2.html"));
      viewConnection.sendKeyEvent(backDown);
      viewConnection.sendKeyEvent(backUp);
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("index.html"));
  } 
   

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: sendKeyEvent, sleep
      assertTrue(url.endsWith("sample2.html"));
      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("sample3.html"));
      BaseInputConnection viewConnection = new BaseInputConnection(testView, true);
      KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
      KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
      viewConnection.sendKeyEvent(backDown);
      viewConnection.sendKeyEvent(backUp);
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("sample2.html"));
      viewConnection.sendKeyEvent(backDown);
      viewConnection.sendKeyEvent(backUp);
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("index.html"));
  } 
   

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: sendKeyEvent, sleep
      assertTrue(url.endsWith("sample2.html"));
      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("sample3.html"));
      BaseInputConnection viewConnection = new BaseInputConnection(testView, true);
      KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
      KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
      viewConnection.sendKeyEvent(backDown);
      viewConnection.sendKeyEvent(backUp);
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("sample2.html"));
      viewConnection.sendKeyEvent(backDown);
      viewConnection.sendKeyEvent(backUp);
      sleep(); 
      url = testView.getUrl();
      assertTrue(url.endsWith("index.html"));
  } 
   

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
            outAttrs.initialSelEnd = outAttrs.initialSelStart = -1;
            outAttrs.label = "";
            outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI;
            outAttrs.inputType = InputType.TYPE_NULL;
 
            return new BaseInputConnection (this, false);
        } 
 
        //============================================================================== 
        @Override 
        protected void onSizeChanged (int w, int h, int oldw, int oldh)
        { 
            super.onSizeChanged (w, h, oldw, oldh);
            viewSizeChanged(); 
        } 
 
        @Override 
        protected void onLayout (boolean changed, int left, int top, int right, int bottom)
        { 
            for (int i = getChildCount(); --i >= 0;)
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
            outAttrs.initialSelEnd = outAttrs.initialSelStart = -1;
            outAttrs.label = "";
            outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI;
            outAttrs.inputType = InputType.TYPE_NULL;
 
            return new BaseInputConnection (this, false);
        } 
 
        //============================================================================== 
        @Override 
        protected void onSizeChanged (int w, int h, int oldw, int oldh)
        { 
            super.onSizeChanged (w, h, oldw, oldh);
            viewSizeChanged(); 
        } 
 
        @Override 
        protected void onLayout (boolean changed, int left, int top, int right, int bottom)
        { 
            for (int i = getChildCount(); --i >= 0;)
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android BaseInputConnection Questions & Answers:

See Code Examples for Android BaseInputConnection Methods: