What is the duration of a Toast LENGTH_LONG and LENGTH_SHORT

后端 未结 6 1401
梦毁少年i
梦毁少年i 2020-12-01 10:13

I need the exact duration of LENGTH_LONG and LENGTH_SHORT in milliseconds (ms). Also I need to know if the duration of Toast message with LENGTH_LONG will have the same dura

6条回答
  •  温柔的废话
    2020-12-01 10:51

    You need set the duration override, with setDuration in the action, example:

    int s = 6000; // milisegundo    
    Snackbar.make(coordinatorLayout, "This is my Snackbar", Snackbar.LENGTH_LONG).setDuration(s)
    .show();
    

提交回复
热议问题