Saturday, January 31, 2009

Webkit About box

This is kind of overkill for an About dialog, but the neat thing is you can click on the URL and go right to the web page. Hitting the back button returns to your application so it is very smooth

public class about extends Activity {
WebView aboutText;
public void onCreate(Bundle icicle) {
aboutText = (WebView)findViewById(;
String str = "<I>Yoga Timer</I><HR/>Version 1.4<BR/>" +
"<P>Patterns multiply the starting value to set separate durations for the four parts of the breath: <UL>" +
"<LI>Inhalation (Pooraka)<LI>Retention (Abhyantar Kumbhaka)<LI>Exhalation (Rechaka)<LI>Suspension (Bahya Kumbhaka)</UL>" +
"<P>Check for new versions here <A href=>CUBICWARE.COM</A>";
aboutText.loadData(str, "text/html", "utf-8");
Button okButton = (Button) findViewById(;
okButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {

No comments:

Post a Comment