sometime we noticed that when long press any content they create a toast massage and show details about self.

Today i explain code for long press toast massage action. look below.

Code

textview1.setOnLongClickListener(new View.OnLongClickListener() {@Override public boolean onLongClick(View v) {Toast.makeText(getApplicationContext(),”your massage“,Toast.LENGTH_LONG).show();return false;
}
});

How apply this code

it’s very easy just copy the code and past were you want.

Can I also use this code in sketchwere

yes this is a java code block and you can also use in sketchwere and also any java project. For use in sketchwere simple add source directly block and past this code