Code example for Instrumentation

Methods: runOnMainSync

0
this.instrumentation = instrumentation;
  } 
 
  public void runOnMainSync(Runnable runner) {
    instrumentation.runOnMainSync(runner);
  } 
 
  public void setContentView(final Activity activity, final View view) {
    runOnMainSync(new Runnable() {
      @Override 
      public void run() { 
        activity.setContentView(view);
      } 
    }); 
  } 
 
  public void layout(final View view,
                     final int left, final int top, final int right, final int bottom) {
    runOnMainSync(new Runnable() {
      @Override