今天转悠转悠,跑到了OPHONE网站去了。
首先去的是:http://www.mmarket.com/
然后进入了开发者社区:http://dev.chinamobile.com/cmdn/supesite/
里面的资料还有些,看了看OPHONE SDK的一点编程资料
从DEMO又调到了:http://www.ophonesdn.com/documentation/ophone/gettingstarted/hello_ophone.html
这是一个源码:
http://www.ophonesdn.com/documentation/ophone/samples/ophoneapps/HomeAPIDemo/src/oms/samples/home/HomeAPIDemoActivity.java.html
/**
* This demo implement 3 functions:
* 1. Add/Remove symbol to shortcut.
* For example: In Feiton, if you received messages, you can show the
* message count on the shortcut. While user read the message, remove
* the symbol from Fetion shortcut.
* 2. Add shortcut on Home Screen.
* If you install an application, you can use Home Screen API
* to add shortcut on Home Screen.
* If you want to delete the shortcut, you should delete it manually.
* Long press the shortcut item, and select ’delete’ item.
* 3. Register a broadcast receiver, so you can know when the Home Screen
* load complete or when the shortcut is added.
* For more detail, see the following demo code.
* */
感觉还是太复杂了
TextPaint textPaint = new TextPaint();
textPaint.setColor(Color.WHITE);
textPaint.setAntiAlias(true);
textPaint.setTextAlign(Align.CENTER);
textPaint.setTextSize(14f);
textPaint.setFakeBoldText(true);
canvas.drawBitmap(bg, 0, 0, null);
canvas.drawText(Integer.toString(mUnreadMessageCount), bg
.getWidth() / 2, 14, textPaint);
看来没有可视化界面编程,如果做复杂界面程序,估计是个痛苦的事情
至于编程也是大同小异。
也是NEW,然后设置属性,最后画出来
不过CANVAS好像很强悍的样子
画图,画文本
历史博文
标签:
java,
ophone