Code example for ClipboardManager

Methods: addPrimaryClipChangedListener

0
 
	private View.OnClickListener onClick_Enabled = new View.OnClickListener() {
		@Override 
		public void onClick(View v) { 
			ClipboardManager manager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 
			manager.addPrimaryClipChangedListener(new ClipboardManager.OnPrimaryClipChangedListener() { 
				@Override 
				public void onPrimaryClipChanged() { 
 
				} 
			}); 
		} 
	}; 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present. 
		getMenuInflater().inflate(R.menu.main, menu);
		return true; 
	}