Documentation

Trace: Component badge

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
flutterui:badge_component [2025/09/17 11:53]
admin
flutterui:badge_component [2025/09/17 12:00] (current)
admin
Line 42: Line 42:
 </​code>​ </​code>​
  
-But it's much easier to use the API:+\\ \\  
 +But it's much easier to use the **API**:
  
 <code java> <code java>
Line 62: Line 63:
 </​code>​ </​code>​
  
 +The API calls will replace available styles! If you set the style on your own, you should replace style names correctly, e.g.
 +
 +<code java>
 +Style.addStyleNames(comp,​ "​f_badge_text_9"​);​
 +
 +Style.removeStyleNames(comp,​ "​f_badge_text_9"​);​
 +Style.addStyleNames(comp,​ "​f_badge_text_10"​);​
 +</​code>​
 +
 +\\ \\ 
 +It's also possible to set screen badges (for the menu):
 +
 +<code java>
 +BadgeUtil.setBadge(this,​ UsersWorkScreen.class,​ Integer.valueOf(1));​
 +</​code>​
 +
 +This will show a badge in the menu, e.g.:
 +
 +{{:​flutterui:​menubadge.png?​nolink&​width=400|}}
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information