Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want delete the selected row when click on Menue.FIRST +1

Java
@Override
   public boolean onMenuItemSelected(int featureId, MenuItem item) {
       // TODO Auto-generated method stub

       switch (item.getItemId())
       {
           case Menu.FIRST:
               // getting values from selected ListItem
               String URL = ((TextView) findViewById(R.id.txt_link)).getText().toString();

               // Starting new intent
               Intent i = new Intent(getApplicationContext(), ShowNewsActivity.class);
               i.putExtra("URLname", URL);
               startActivity(i);
               break;
           case Menu.FIRST + 1:
               Toast.makeText(this, "Exit Clicked for context menu", Toast.LENGTH_LONG).show();

               break;
       }
       return super.onMenuItemSelected(featureId, item);
   }



How I can Do this ???
Plz Help me
Posted
Comments
Richard MacCutchan 15-Oct-14 7:16am    
What ListView?
‫محم د‬‎ 15-Oct-14 7:18am    
list1 = (ListView) findViewById(R.id.RssList);
registerForContextMenu(list1);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900