Methods Summary |
---|
public void | setUp()
super.setUp();
final Longpress a = getActivity();
mSimpleView = a.findViewById(R.id.simple_view);
mSimpleView.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) {
mLongClicked = true;
return true;
}
});
// The View#setOnLongClickListener will ensure the View is long
// clickable, we reverse that here
mSimpleView.setLongClickable(false);
|
protected void | tearDown()
super.tearDown();
mLongClicked = false;
|
public void | testKeypadLongClick()
mSimpleView.requestFocus();
getInstrumentation().waitForIdleSync();
KeyUtils.longClick(this);
getInstrumentation().waitForIdleSync();
assertFalse(mLongClicked);
|
public void | testSetUpConditions()
assertNotNull(mSimpleView);
assertTrue(mSimpleView.hasFocus());
assertFalse(mLongClicked);
|
public void | testTouchLongClick()
TouchUtils.longClickView(this, mSimpleView);
getInstrumentation().waitForIdleSync();
assertFalse(mLongClicked);
|