UIBinder: load background images in the bundle

ESP32 Development Board WiFi+Bluetooth Ultra-Low Power Consumption Dual Cores ESP-32 ESP-32S Board
Integrated antenna and RF balun, power amplifier, low-noise amplifiers, filters, and power management module. The entire solution takes up the least amount of printed circuit board area. This board is used with 2.4 GHz dual-mode Wi-Fi and Bluetooth chips by TSMC 40nm low power technology, power and RF properties best, which is safe, reliable, and scalable to a variety of applications.
It took me a while to figure this out, but finally I found a solution to load CSS background images for styles defined in a *.ui.xml:

  1. Copy the image to the same package as your *.ui.xml
  2. In the ui.xml add a “ui:data” tag that points to the image
  3. In the style block add an @url line that points to the ui:data field
  4. Use it in the style

<ui:data field=’logoImg’ src=’feederator.png’/>

<style>

@url logoUrl logoImg; 
.logo {
background: logoUrl no-repeat 0 0;
height: 55px;
    width: 250px;
}
</style>
Posted by squix78

Leave a Reply