Here I have created Toast function in android. Toast function can be used to display information or message for the very short period of time. In the below code I have explain how to make Toast function. 
lvList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                    @Override
                    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                        ListData mLog = listAdapter.getItem(position);
                        Toast.makeText(MainActivity.this, "Title: " + mLog.getTitle() + "  Description: " + mLog.getDescription(), Toast.LENGTH_LONG).show();
                        myList.remove(position);
                        listAdapter.notifyDataSetChanged();
                        listAdapter.notifyDataSetChanged();
                    }
                });
                       
                    
0 Comment(s)