Code example for CheckBox

Methods: isCheckedperformClick

0
				dateLayout.getVisibility(), View.GONE);
	} 
 
	@UiThreadTest 
	public void testToggleContacts() { 
		contactsCheck.performClick();
		assertTrue(contactsCheck.isChecked());
		assertEquals("Contacts layout visibility",
				contactsLayout.getVisibility(), View.VISIBLE);
		contactsCheck.performClick();
		assertTrue(!contactsCheck.isChecked());
		assertEquals("Contacts layout visibility",
				contactsLayout.getVisibility(), View.GONE);
	} 
 
	@UiThreadTest 
	public void testToggleSentReceived() { 
		sentCheck.performClick();
		assertTrue(sentCheck.isChecked());
		assertEquals("Sent/received layout visibility",
Contextual code suggestions in your IDE  Get Codota for Java