InterviewSolution
Saved Bookmarks
| 1. |
What is the use of Notification Chanel and how to create it? |
|
Answer» A toast can be displayed on the screen is defined by a flag as Duration. We can set duration SHORT or Long. The value for Short is 2.0 second and value for Long is 3.5 Second. Context context = getApplicationContext(); Toast.makeText(context, "Testing Toast Message.", Toast.LENGTH_SHORT).show();You can not directly change the duration of Toast Message which is showing in the show() method. But there is a workaround. You can use CountDownTimer Class or Handler Class to INCREASE display time of Toast. |
|