What is the value of Toast.LENGTH_LONG and Toast.LENGTH_SHORT?

后端 未结 4 744
后悔当初
后悔当初 2021-02-11 16:14

I am printing Toast message in my application to show notification but i want to know value of Toast.LENGTH_LONG and Toast.LENGTH_SHORT. What other values i can use.

Ca

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-11 17:13

    There is another question that answers what you are looking for. The answers are:

    private static final int LONG_DELAY = 3500; // 3.5 seconds
    private static final int SHORT_DELAY = 2000; // 2 seconds
    

    This was courtesy of FeelGood. You can find the whole thread below.

    Can an Android Toast be longer than Toast.LENGTH_LONG?

    Hope this helps.

提交回复
热议问题