Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make Toast in android ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 131
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: