title: How to add item to menu while long pressing text in android
body: <p>I am pretty new to android. I went through some tutorials and articles to work in android development. Just started to develop the app. I am progressing with texts and buttons etc. </p>
  
  <p>I am showing some texts in view. If I long press the text in app, it shows the options for cut, copy etc.,</p>
  
  <p>I just want to add one more item to this called "Greet". How to do this.</p>
  
  <p>In iOS I am able to do this using the following code..</p>
  
  <pre><code> UIMenuItem *highlightMenuItem = [[UIMenuItem alloc] initWithTitle:@"Greet" action:@selector(highlight)];
  
  [[UIMenuController sharedMenuController] setMenuItems:[NSArray arrayWithObject:highlightMenuItem]];
  </code></pre>
  
  <p>Following is the output in iOS.</p>
  
  <p><a href="https://i.stack.imgur.com/XNF6P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XNF6P.png" alt="enter image description here"></a></p>
  
  <p>How to do this same thing in Android.</p>
  
  <p>I looked in some tutorials but all of them focused on adding new menus to app. I am looking for add a item to cut/copy menu.</p>