0

I have been searching from internet and trying on my application. I cant found what is the different between LENGTH_LONG and LENGTH_SHORT. So what is the different between both of them and when to use them.

David Adam
  • 172
  • 1
  • 12
  • They just determine how long to display the `Toast`. `LENGTH_LONG` is 3.5 seconds, and `LENGTH_SHORT` is 2 seconds. Use as you see appropriate. – Mike M. May 19 '18 at 07:11
  • Duration. `Length long` is 3.5 second however `short` is 2 second. Toast is one of the I consider Pop up message, other pop up message can consider `AlertBuilder`. useful too – Kopi Bryant May 19 '18 at 08:36

1 Answers1

2

Both are used for duration of Toast visible

LENGTH_LONG syntax

private static final int LONG_DELAY = 3500; // 3.5 seconds

LENGTH_SHORT syntax

private static final int SHORT_DELAY = 2000; // 2 seconds

Community
  • 1
  • 1
Venki WAR
  • 1,997
  • 4
  • 25
  • 38