Ext.toast position configuration

4.6k views Asked by At

Sencha Touch 2.4 has this new toast class(Ext.Toast), which looks nice. But, by default, the location of the toast is centered in the viewport. Is there any way I can push it towards the bottom?

I looked at the top config, but it doesn't work well. (Pushes it down, but it's not centered horizontally now).

Tried a combination of top and left configs, but it's not perfect. I don't seem to find any hints in the docs.

Basically, I need to display the toast around of 70% of the height, and it should be centered horizontally in the viewport.

3

There are 3 answers

1
Mahesh B On

I've also faced this problem I found the solution.You can also find it by the below link.

sample toast with different position and animation

1
rhawk On

Not ideal but the following css will do it. Just change the number depending on high high you want it.

.x-toast {
    top: -150px; 
}

1
barryloh On

I've created a plugin that can create toast messages similar to Android style at the bottom of the screen.