public void displayAndFocus(View view) {
    LinearLayout linearLayout =
        ((LinearLayout) findViewById(io.selendroid.testapp.R.id.focusedLayout));
    if (linearLayout.isShown()) {
      linearLayout.setVisibility(View.GONE);
    } else {
      linearLayout.setVisibility(View.VISIBLE);
      linearLayout.requestFocus();
    }
  }
Demo project to verify selendroid actions.

@author ddary
selendroid-test-app/src/main/java/io/selendroid/testapp/HomeScreenActivity.java