Java Reference
In-Depth Information
A.3.2 Creating a Widget Descriptor
To get started, let's create a folder named hello_world in the devkit
directory. Within this
folder, create widget.xml containing the
following code:
<?xml version="1.0" encoding="UTF-8"?>
<widget spec_version="2.1">
<info>
<name>Hello World</name>
<version>1.0</version>
<author>render</author>
<clientversion>1.0</clientversion>
<shortdescription>Very simple widget</shortdescription>
<longdescription>Simplest possible widget saying hello to the world.
</longdescription>
<tags>test example hello world</tags>
</info>
<parameters>
<parameter type="string"
name="widgetname"
description="Name of widget"
editable="no">Hello World</parameter>
</parameters>
<resources>
<code src="helloworld.he"/>
<stylesheet>
bg color-1: white;
background: solid black;
align: hcenter vcenter;
border: 1 1 1 1;
border-type: rectangle white;
} text {
color-1: white;
padding: 2 2 2 2;
}
</stylesheet>
</resources>
<layout minimizedheight="65sp">
<view id="viewMini" class="bg">
<label class="text">$ { widgetname } </label>
</view>
<view id="viewMaxi" class="bg">
<script id="hello" class="text"/>
</view>
<webview>
<weblabel class="top: 0px; left: 10px;"
style="color: black;">$ { widgetname } </weblabel>
</webview>
</layout>
</widget>
 
Search WWH ::




Custom Search