【函数】 | void show(String style, String ball, String background) |
【说明】 | 显示触摸球,并在触摸球被移动时回调事件onTouchBallMove。 |
【返回】 | 无 |
【参数】 |
style:样式表。
ball:触摸球的图片,以"http://"或"file://"开头。 background:触摸球的背景图片,以"http://"或"file://"开头。 |
【示例】 | 无 |
【函数】 | void show(String style, String ball, String background, int upKeycode, int downKeycode, int leftKeycode, int rightKeycode, int accuracy) |
【说明】 | 显示触摸球,并在触摸球被移动时向浏览器发送按键。 |
【返回】 | 无 |
【参数】 |
style:样式表。
ball:触摸球的图片,以"http://"或"file://"开头。 background:触摸球的背景图片,以"http://"或"file://"开头。 upKeycode:当触摸球向上时发送的按键(Android按键码)。 downKeycode:当触摸球向下时发送的按键(Android按键码)。 leftKeycode:当触摸球向左时发送的按键(Android按键码)。 rightKeycode:当触摸球向右时发送的按键(Android按键码)。 accuracy:精度,如果精度小于零,将不会发送按键,而是回调onTouchBallMove事件,和show(String style, String ball, String background)相同。 |
【示例】 |
rexseeTouchBall.show('width:200;height:200;background-color:black;','file:///android_asset/touchBall.png','file:///android_asset/touchBallPad.png',19,20,21,22,-1);
运行示例
|
【函数】 | void dismiss() |
【说明】 | 隐藏触摸球。 |
【返回】 | 无 |
【参数】 | 无 |
【示例】 |
rexseeTouchBall.dismiss();
运行示例
|
【函数】 | void setStyle(String style) |
【说明】 | 设置弹出窗口的样式。 |
【返回】 | 无 |
【参数】 | style:样式表。 |
【示例】 |
rexseeTouchBall.setStyle('border-width:5;');
运行示例
|
【函数】 | String getStyle(String name) |
【说明】 | 读取弹出窗口的样式。 |
【返回】 | 样式的值。 |
【参数】 | name:样式名称。 |
【示例】 |
alert(rexseeTouchBall.getStyle('width'));
运行示例
|