ListView menuList = (ListView) findViewById(R.id.ListView_Menu);
String[] items = {getResources().getString(R.string.menu_item_NxtInc)};
ArrayAdapter<String> adapt = new ArrayAdapter<String>(this,R.layout.menu_item,items);
menuList.setAdapter(adapt);
menuList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View itemClicked, int position, long id) {
TextView textView = (TextView) itemClicked;
String strText = textView.getText().toString();
if (strText.equalsIgnoreCase(getResources().getString(R.string.menu_item_NxtInc))) {
startActivity(new Intent(EndActivity.this, NxtIncActivity.class));
EndActivity.this.finish();
}
I have created a menu in my application with the above code. If the user clicks on the string menu_item_NxtInc they are taken to the next activity. What i would like to happen is for a prompt to appear saying are you sure you want to do this? Anyone know how to implement this. thanks
As simple as this