如何在 GWT 中使用 uibinder 创建图像按钮。 我当前的代码如下:
图像正确显示,因此图像资源正常工作。
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:with type="com.test.client.Resources" field="res"></ui:with>
<g:HTMLPanel>
<g:Image resource="{res.facebook_32}"/>
<g:PushButton>
<g:downFace image="{res.facebook_32}"></g:downFace>
<g:upFace image="{res.facebook_32}"></g:upFace>
</g:PushButton>
</g:HTMLPanel>
</ui:UiBinder>
图像正确显示,因此图像资源正常工作。