Code example for ContextMenu

Methods: add

	private View.OnCreateContextMenuListener mBtnLengthOnCtxListener  = new View.OnCreateContextMenuListener() {
		public void onCreateContextMenu(ContextMenu menu, View v, 
				ContextMenuInfo menuInfo) { 
			menu.add(0, SECONDS, 0, "Second(s)"); 
			menu.add(0, MINUTES, 1, "Minute(s)"); 
			menu.add(0, HOURS, 2, "Hour(s)"); 
	private View.OnClickListener mBtnOkOnClick = new View.OnClickListener() {
		public void onClick(View v) { 
			try { 
				int nt = Integer.parseInt(mEtNumber.getText().toString()); 
				switch (mCurrentLength) { 
				case HOURS: 
Connect your IDE to all the code out there  Get Codota for Java