tabframe

监听tabLayout中有tabBar时frame项的切换事件。字符串类型

callback(ret, err)

ret:

  • 描述:frame切换的回调
  • 内部字段:
  1. {
  2. name: //当前显示frame名称,字符串类型
  3. index: //当前显示frame索引,数字类型
  4. }

示例代码

  1. api.addEventListener({
  2. name:'tabframe'
  3. },function(ret, err){
  4. alert('当前显示frame:'+ret.name);
  5. });

可用性

iOS系统,Android系统

可提供的1.3.9及更高版本

窗口系统

openWin closeWin closeToWin windows setWinAttr openFrame closeFrame frames setFrameAttr bringFrameToFront sendFrameToBack setFrameClient animation openFrameGroup closeFrameGroup setFrameGroupAttr setFrameGroupIndex openPopoverWin closePopoverWin openSlidLayout openSlidPane closeSlidPane lockSlidPane unlockSlidPane openDrawerLayout openDrawerPane closeDrawerPane loadData execScript setBlurEffect removeLaunchView showLaunchView parseTapmode

高级窗口

openTabLayout setTabLayoutAttr setNavBarAttr setTabBarAttr setTabBarItemAttr

应用管理

installApp uninstallApp openApp appInstalled rebootApp openWidget closeWidget

网络通信

ajax cancelAjax download cancelDownload imageCache applyCertificates

数据存储

readFile writeFile setPrefs getPrefs removePrefs setGlobalData getGlobalData clearCache getCacheSize getTotalSpace getFreeDiskSpace loadSecureValue

消息事件

addEventListener removeEventListener sendEvent accessNative notification cancelNotification

设备访问

startLocation stopLocation getLocation startSensor stopSensor call sms mail openContacts setFullScreen setStatusBarStyle setScreenOrientation setKeepScreenOn toLauncher setScreenSecure setAppIconBadge getPhoneNumber hasPermission requestPermission getInterfaceStyle setInterfaceStyle

UI组件

alert confirm prompt actionSheet showProgress hideProgress toast openPicker setRefreshHeaderInfo setCustomRefreshHeaderInfo refreshHeaderLoading refreshHeaderLoadDone showFloatBox setMenuItems

多媒体

getPicture saveMediaToAlbum startRecord stopRecord startPlay stopPlay openVideo

模块加载

require

WebApp历史

historyBack historyForward

其它

pageUp pageDown setFocus