2

Can I change the position of the loading indicator (Valo Theme) depending on the view? (E.g. top: 0px for one view and top: 50px for another view)

Hengrui Jiang
  • 861
  • 1
  • 10
  • 23
  • 1
    It's been a while since I had to customise it ,so I may be wrong if it changed meanwhile but if I'm not mistaking it does not have an _associated object_ to change its style, like for example with a label or button. The `UI.getLoadingIndicatorConfiguration()` allows changing only its timeouts. So the quickest and dirtiest hack that comes to mind is to have a _central theme_ with your styles, then extend it with how many variations you need [configureing the load indicator parts](https://vaadin.com/forum#!/thread/8182258), and apply the specific one when switching the views – Morfic Oct 06 '16 at 14:23
  • I don't know if this would work, but try using the @Stylesheet annotation againsts your View class to add custom CSS for your view then use the CSS class .v-loading-indicator to change the location. – Chris M Oct 07 '16 at 08:57
  • My problem is that the loading indicator div is outside of the view, thus I cannot access the div with .view-class-name .v-loading-indicator :( – Hengrui Jiang Oct 07 '16 at 09:41
  • You could use javascript to add / remove css classes from the loading indicator div before your view change. – Chris M Oct 10 '16 at 09:47

0 Answers0