Code example for MenuItem

Methods: getItemId, getTitle

0
	private int mCurrentLength;
 
 
	@Override 
	public boolean onContextItemSelected(MenuItem item) {
		mCurrentLength = item.getItemId();
		mBtnLength.setText(item.getTitle());
		return super.onContextItemSelected(item);
	} 
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub 
		super.onCreate(savedInstanceState);
		setContentView(R.layout.time_chooser);
		 
		Bundle extras = getIntent().getExtras();
		setTitle(extras.getInt(EXTRA_TITLE));
		 
		 
		initViews();