@quicktvui/ai 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/.clinerules +28 -4
- package/rules/.cursorrules +28 -4
- package/rules/.github/copilot-instructions.md +28 -4
- package/rules/.source/ESADPlayer/package.json +24 -0
- package/rules/.source/ESADPlayer/rollup.config.js +33 -0
- package/rules/.source/ESADPlayer/src/component/ESADPlayerViewComponent.ts +466 -0
- package/rules/.source/ESADPlayer/src/core/ESADType.ts +6 -0
- package/rules/.source/ESADPlayer/src/index.ts +18 -0
- package/rules/.source/ESADPlayer/src/index.vue +963 -0
- package/rules/.source/ESADPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESADPlayer/tsconfig.json +34 -0
- package/rules/.source/ESAudioPlayer/package.json +23 -0
- package/rules/.source/ESAudioPlayer/rollup.config.js +33 -0
- package/rules/.source/ESAudioPlayer/src/index.ts +10 -0
- package/rules/.source/ESAudioPlayer/src/index.vue +1441 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayer.ts +169 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.android.ts +134 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.harmony.ts +139 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.ts +44 -0
- package/rules/.source/ESAudioPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESAudioPlayer/src/utils/ESAudioPlayerDefinitionUtils.ts +36 -0
- package/rules/.source/ESAudioPlayer/tsconfig.json +34 -0
- package/rules/.source/ESAudioServicePlayer/package.json +23 -0
- package/rules/.source/ESAudioServicePlayer/rollup.config.js +33 -0
- package/rules/.source/ESAudioServicePlayer/src/index.ts +10 -0
- package/rules/.source/ESAudioServicePlayer/src/index.vue +1400 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayer.ts +189 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.android.ts +155 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.harmony.ts +163 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.ts +50 -0
- package/rules/.source/ESAudioServicePlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESAudioServicePlayer/src/utils/ESAudioServicePlayerDefinitionUtils.ts +36 -0
- package/rules/.source/ESAudioServicePlayer/tsconfig.json +34 -0
- package/rules/.source/ESAxios/CHANGELOG.md +1072 -0
- package/rules/.source/ESAxios/LICENSE +7 -0
- package/rules/.source/ESAxios/MIGRATION_GUIDE.md +3 -0
- package/rules/.source/ESAxios/README.md +1673 -0
- package/rules/.source/ESAxios/index.d.cts +549 -0
- package/rules/.source/ESAxios/index.d.ts +766 -0
- package/rules/.source/ESAxios/index.js +43 -0
- package/rules/.source/ESAxios/lib/adapters/README.md +37 -0
- package/rules/.source/ESAxios/lib/adapters/adapters.js +80 -0
- package/rules/.source/ESAxios/lib/adapters/fetch.js +295 -0
- package/rules/.source/ESAxios/lib/axios.js +90 -0
- package/rules/.source/ESAxios/lib/cancel/CancelToken.js +135 -0
- package/rules/.source/ESAxios/lib/cancel/CanceledError.js +31 -0
- package/rules/.source/ESAxios/lib/cancel/isCancel.js +5 -0
- package/rules/.source/ESAxios/lib/core/Axios.js +292 -0
- package/rules/.source/ESAxios/lib/core/AxiosError.js +108 -0
- package/rules/.source/ESAxios/lib/core/AxiosHeaders.js +340 -0
- package/rules/.source/ESAxios/lib/core/InterceptorManager.js +71 -0
- package/rules/.source/ESAxios/lib/core/README.md +8 -0
- package/rules/.source/ESAxios/lib/core/buildFullPath.js +26 -0
- package/rules/.source/ESAxios/lib/core/dispatchRequest.js +81 -0
- package/rules/.source/ESAxios/lib/core/mergeConfig.js +112 -0
- package/rules/.source/ESAxios/lib/core/settle.js +31 -0
- package/rules/.source/ESAxios/lib/core/transformData.js +33 -0
- package/rules/.source/ESAxios/lib/defaults/index.js +182 -0
- package/rules/.source/ESAxios/lib/defaults/transitional.js +7 -0
- package/rules/.source/ESAxios/lib/env/README.md +3 -0
- package/rules/.source/ESAxios/lib/env/classes/FormData.js +2 -0
- package/rules/.source/ESAxios/lib/env/data.js +1 -0
- package/rules/.source/ESAxios/lib/helpers/AxiosTransformStream.js +160 -0
- package/rules/.source/ESAxios/lib/helpers/AxiosURLSearchParams.js +65 -0
- package/rules/.source/ESAxios/lib/helpers/HttpStatusCode.js +71 -0
- package/rules/.source/ESAxios/lib/helpers/README.md +7 -0
- package/rules/.source/ESAxios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/rules/.source/ESAxios/lib/helpers/bind.js +7 -0
- package/rules/.source/ESAxios/lib/helpers/buildURL.js +69 -0
- package/rules/.source/ESAxios/lib/helpers/callbackify.js +18 -0
- package/rules/.source/ESAxios/lib/helpers/combineURLs.js +15 -0
- package/rules/.source/ESAxios/lib/helpers/composeSignals.js +61 -0
- package/rules/.source/ESAxios/lib/helpers/cookies.js +40 -0
- package/rules/.source/ESAxios/lib/helpers/deprecatedMethod.js +31 -0
- package/rules/.source/ESAxios/lib/helpers/formDataToJSON.js +95 -0
- package/rules/.source/ESAxios/lib/helpers/formDataToStream.js +122 -0
- package/rules/.source/ESAxios/lib/helpers/fromDataURI.js +62 -0
- package/rules/.source/ESAxios/lib/helpers/isAbsoluteURL.js +15 -0
- package/rules/.source/ESAxios/lib/helpers/isAxiosError.js +14 -0
- package/rules/.source/ESAxios/lib/helpers/isURLSameOrigin.js +17 -0
- package/rules/.source/ESAxios/lib/helpers/null.js +2 -0
- package/rules/.source/ESAxios/lib/helpers/parseHeaders.js +69 -0
- package/rules/.source/ESAxios/lib/helpers/parseProtocol.js +6 -0
- package/rules/.source/ESAxios/lib/helpers/progressEventReducer.js +51 -0
- package/rules/.source/ESAxios/lib/helpers/readBlob.js +15 -0
- package/rules/.source/ESAxios/lib/helpers/resolveConfig.js +83 -0
- package/rules/.source/ESAxios/lib/helpers/speedometer.js +55 -0
- package/rules/.source/ESAxios/lib/helpers/spread.js +28 -0
- package/rules/.source/ESAxios/lib/helpers/throttle.js +44 -0
- package/rules/.source/ESAxios/lib/helpers/toFormData.js +241 -0
- package/rules/.source/ESAxios/lib/helpers/toURLEncodedForm.js +25 -0
- package/rules/.source/ESAxios/lib/helpers/trackStream.js +89 -0
- package/rules/.source/ESAxios/lib/helpers/validator.js +120 -0
- package/rules/.source/ESAxios/lib/platform/browser/classes/Blob.js +3 -0
- package/rules/.source/ESAxios/lib/platform/browser/classes/FormData.js +3 -0
- package/rules/.source/ESAxios/lib/platform/browser/classes/URLSearchParams.js +6 -0
- package/rules/.source/ESAxios/lib/platform/browser/index.js +13 -0
- package/rules/.source/ESAxios/lib/platform/common/classes/FormData.js +142 -0
- package/rules/.source/ESAxios/lib/platform/common/index.js +7 -0
- package/rules/.source/ESAxios/lib/platform/common/utils.js +54 -0
- package/rules/.source/ESAxios/lib/platform/index.js +7 -0
- package/rules/.source/ESAxios/lib/platform/node/classes/FormData.js +3 -0
- package/rules/.source/ESAxios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/rules/.source/ESAxios/lib/platform/node/index.js +12 -0
- package/rules/.source/ESAxios/lib/utils.js +820 -0
- package/rules/.source/ESCore/CHANGELOG.md +7 -0
- package/rules/.source/ESCore/package.json +24 -0
- package/rules/.source/ESCore/rollup.config.js +28 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBar.ts +48 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBarModule.android.ts +29 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBarModule.harmony.ts +31 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBarModule.ts +9 -0
- package/rules/.source/ESCore/src/actionbar/index.ts +2 -0
- package/rules/.source/ESCore/src/app/ESAppInfo.ts +12 -0
- package/rules/.source/ESCore/src/app/ESAppInfoList.ts +9 -0
- package/rules/.source/ESCore/src/app/ESAppList.ts +64 -0
- package/rules/.source/ESCore/src/app/ESAppListModule.android.ts +55 -0
- package/rules/.source/ESCore/src/app/ESAppListModule.harmony.ts +57 -0
- package/rules/.source/ESCore/src/app/ESAppListModule.ts +15 -0
- package/rules/.source/ESCore/src/app/index.ts +4 -0
- package/rules/.source/ESCore/src/application/ESAppContext.ts +99 -0
- package/rules/.source/ESCore/src/application/ESAppKeyManager.android.ts +86 -0
- package/rules/.source/ESCore/src/application/ESAppKeyManager.harmony.ts +91 -0
- package/rules/.source/ESCore/src/application/ESAppKeyManager.ts +23 -0
- package/rules/.source/ESCore/src/application/ESAppLifecycleManager.android.ts +199 -0
- package/rules/.source/ESCore/src/application/ESAppLifecycleManager.harmony.ts +197 -0
- package/rules/.source/ESCore/src/application/ESAppLifecycleManager.ts +36 -0
- package/rules/.source/ESCore/src/application/ESAppModuleManager.ts +294 -0
- package/rules/.source/ESCore/src/application/ESAppParams.ts +14 -0
- package/rules/.source/ESCore/src/application/ESApplication.ts +169 -0
- package/rules/.source/ESCore/src/application/index.ts +38 -0
- package/rules/.source/ESCore/src/audio/ESAudio.ts +190 -0
- package/rules/.source/ESCore/src/audio/ESAudioContentType.ts +7 -0
- package/rules/.source/ESCore/src/audio/ESAudioDirection.ts +5 -0
- package/rules/.source/ESCore/src/audio/ESAudioDurationHint.ts +7 -0
- package/rules/.source/ESCore/src/audio/ESAudioManagerFlag.ts +14 -0
- package/rules/.source/ESCore/src/audio/ESAudioModule.android.ts +173 -0
- package/rules/.source/ESCore/src/audio/ESAudioModule.harmony.ts +152 -0
- package/rules/.source/ESCore/src/audio/ESAudioModule.ts +63 -0
- package/rules/.source/ESCore/src/audio/ESAudioStreamType.ts +15 -0
- package/rules/.source/ESCore/src/audio/ESAudioUsage.ts +20 -0
- package/rules/.source/ESCore/src/audio/index.ts +9 -0
- package/rules/.source/ESCore/src/brightness/ESBrightness.ts +69 -0
- package/rules/.source/ESCore/src/brightness/ESBrightnessModule.android.ts +73 -0
- package/rules/.source/ESCore/src/brightness/ESBrightnessModule.harmony.ts +59 -0
- package/rules/.source/ESCore/src/brightness/ESBrightnessModule.ts +15 -0
- package/rules/.source/ESCore/src/brightness/index.ts +2 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcast.ts +107 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.android.ts +42 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.harmony.ts +45 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.ts +10 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastReceiver.ts +5 -0
- package/rules/.source/ESCore/src/broadcast/ESIntent.ts +6 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentDataAuthority.ts +4 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentDataPath.ts +4 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentDataSchemeSpecificPart.ts +4 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentFilter.ts +13 -0
- package/rules/.source/ESCore/src/broadcast/index.ts +8 -0
- package/rules/.source/ESCore/src/core/IESComponent.ts +1 -0
- package/rules/.source/ESCore/src/core/IESManager.ts +7 -0
- package/rules/.source/ESCore/src/core/IESModule.ts +13 -0
- package/rules/.source/ESCore/src/core/NeedToTyped.ts +1 -0
- package/rules/.source/ESCore/src/core/index.ts +4 -0
- package/rules/.source/ESCore/src/database/ESDatabase.ts +63 -0
- package/rules/.source/ESCore/src/database/ESDatabaseModule.android.ts +49 -0
- package/rules/.source/ESCore/src/database/ESDatabaseModule.harmony.ts +46 -0
- package/rules/.source/ESCore/src/database/ESDatabaseModule.ts +23 -0
- package/rules/.source/ESCore/src/database/index.ts +2 -0
- package/rules/.source/ESCore/src/develop/ESDevelop.ts +75 -0
- package/rules/.source/ESCore/src/develop/ESDevelopInfo.ts +9 -0
- package/rules/.source/ESCore/src/develop/ESDevelopModule.android.ts +50 -0
- package/rules/.source/ESCore/src/develop/ESDevelopModule.harmony.ts +52 -0
- package/rules/.source/ESCore/src/develop/ESDevelopModule.ts +14 -0
- package/rules/.source/ESCore/src/develop/index.ts +3 -0
- package/rules/.source/ESCore/src/device/ESDevice.ts +289 -0
- package/rules/.source/ESCore/src/device/ESDeviceInfo.ts +51 -0
- package/rules/.source/ESCore/src/device/ESDeviceModule.android.ts +143 -0
- package/rules/.source/ESCore/src/device/ESDeviceModule.harmony.ts +116 -0
- package/rules/.source/ESCore/src/device/ESDeviceModule.ts +42 -0
- package/rules/.source/ESCore/src/device/index.ts +3 -0
- package/rules/.source/ESCore/src/display/ESDisplay.ts +61 -0
- package/rules/.source/ESCore/src/display/index.ts +2 -0
- package/rules/.source/ESCore/src/download/ESDownload.ts +181 -0
- package/rules/.source/ESCore/src/download/ESDownloadInfo.ts +14 -0
- package/rules/.source/ESCore/src/download/ESDownloadListener.ts +21 -0
- package/rules/.source/ESCore/src/download/ESDownloadModule.android.ts +57 -0
- package/rules/.source/ESCore/src/download/ESDownloadModule.harmony.ts +66 -0
- package/rules/.source/ESCore/src/download/ESDownloadModule.ts +21 -0
- package/rules/.source/ESCore/src/download/ESDownloadParams.ts +4 -0
- package/rules/.source/ESCore/src/download/ESDownloadState.ts +9 -0
- package/rules/.source/ESCore/src/download/ESDownloadStatus.ts +11 -0
- package/rules/.source/ESCore/src/download/index.ts +7 -0
- package/rules/.source/ESCore/src/error/ESError.ts +88 -0
- package/rules/.source/ESCore/src/error/ESErrorListener.ts +9 -0
- package/rules/.source/ESCore/src/error/ErrorOptions.ts +16 -0
- package/rules/.source/ESCore/src/error/index.ts +2 -0
- package/rules/.source/ESCore/src/es/ES.ts +140 -0
- package/rules/.source/ESCore/src/es/ESModule.android.ts +166 -0
- package/rules/.source/ESCore/src/es/ESModule.harmony.ts +167 -0
- package/rules/.source/ESCore/src/es/ESModule.ts +41 -0
- package/rules/.source/ESCore/src/es/ESSDKInfo.ts +17 -0
- package/rules/.source/ESCore/src/es/ESVersion.ts +14 -0
- package/rules/.source/ESCore/src/es/index.ts +4 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBus.ts +135 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusArg.ts +2 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusCallback.ts +4 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusContext.ts +2 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusEvent.ts +7 -0
- package/rules/.source/ESCore/src/eventbus/index.ts +6 -0
- package/rules/.source/ESCore/src/file/ESFile.ts +381 -0
- package/rules/.source/ESCore/src/file/ESFileModule.android.ts +334 -0
- package/rules/.source/ESCore/src/file/ESFileModule.harmony.ts +343 -0
- package/rules/.source/ESCore/src/file/ESFileModule.ts +101 -0
- package/rules/.source/ESCore/src/file/ESFileStat.ts +19 -0
- package/rules/.source/ESCore/src/file/index.ts +1 -0
- package/rules/.source/ESCore/src/focus/ESFocus.ts +56 -0
- package/rules/.source/ESCore/src/focus/ESFocusModule.android.ts +35 -0
- package/rules/.source/ESCore/src/focus/ESFocusModule.harmony.ts +35 -0
- package/rules/.source/ESCore/src/focus/ESFocusModule.ts +12 -0
- package/rules/.source/ESCore/src/focus/ESFocusable.ts +1 -0
- package/rules/.source/ESCore/src/focus/index.ts +3 -0
- package/rules/.source/ESCore/src/global.d.ts +37 -0
- package/rules/.source/ESCore/src/hlog/ESHLog.ts +276 -0
- package/rules/.source/ESCore/src/hlog/ESHLogModule.ts +130 -0
- package/rules/.source/ESCore/src/hlog/ESLogListener.ts +959 -0
- package/rules/.source/ESCore/src/hlog/LogPluginHelper.ts +44 -0
- package/rules/.source/ESCore/src/hlog/index.ts +6 -0
- package/rules/.source/ESCore/src/hlog/listener/OnInitListenerBase.ts +24 -0
- package/rules/.source/ESCore/src/hlog/listener/OnUploadListenerBase.ts +39 -0
- package/rules/.source/ESCore/src/hlog/listener/RemoveInitListenerBase.ts +17 -0
- package/rules/.source/ESCore/src/hlog/listener/RemoveOldUploadListenerBase.ts +21 -0
- package/rules/.source/ESCore/src/hlog/listener/RemoveUploadListenerBase.ts +29 -0
- package/rules/.source/ESCore/src/hlog/listener/SetInitListenerBase.ts +25 -0
- package/rules/.source/ESCore/src/hlog/listener/SetOldUploadListenerBase.ts +33 -0
- package/rules/.source/ESCore/src/hlog/listener/SetUploadListenerBase.ts +47 -0
- package/rules/.source/ESCore/src/iac/ESIAC.ts +150 -0
- package/rules/.source/ESCore/src/iac/ESIACMessage.ts +5 -0
- package/rules/.source/ESCore/src/iac/ESIACMessageFilter.ts +3 -0
- package/rules/.source/ESCore/src/iac/ESIACModule.android.ts +40 -0
- package/rules/.source/ESCore/src/iac/ESIACModule.harmony.ts +63 -0
- package/rules/.source/ESCore/src/iac/ESIACModule.ts +15 -0
- package/rules/.source/ESCore/src/iac/ESIACReceiver.ts +5 -0
- package/rules/.source/ESCore/src/iac/index.ts +5 -0
- package/rules/.source/ESCore/src/index.ts +92 -0
- package/rules/.source/ESCore/src/key/ESKeyAction.ts +5 -0
- package/rules/.source/ESCore/src/key/ESKeyCode.ts +15 -0
- package/rules/.source/ESCore/src/key/ESKeyEvent.ts +8 -0
- package/rules/.source/ESCore/src/key/index.ts +3 -0
- package/rules/.source/ESCore/src/kv/ESKV.ts +104 -0
- package/rules/.source/ESCore/src/kv/ESKVModule.android.ts +60 -0
- package/rules/.source/ESCore/src/kv/ESKVModule.harmony.ts +80 -0
- package/rules/.source/ESCore/src/kv/ESKVModule.ts +28 -0
- package/rules/.source/ESCore/src/kv/index.ts +2 -0
- package/rules/.source/ESCore/src/local/ESLocalStorage.ts +114 -0
- package/rules/.source/ESCore/src/local/ESLocalStorageModule.android.ts +150 -0
- package/rules/.source/ESCore/src/local/ESLocalStorageModule.harmony.ts +119 -0
- package/rules/.source/ESCore/src/local/ESLocalStorageModule.ts +23 -0
- package/rules/.source/ESCore/src/local/index.ts +2 -0
- package/rules/.source/ESCore/src/location/ESLocation.ts +89 -0
- package/rules/.source/ESCore/src/location/ESLocationInfo.ts +9 -0
- package/rules/.source/ESCore/src/location/ESLocationListener.ts +5 -0
- package/rules/.source/ESCore/src/location/ESLocationModule.android.ts +53 -0
- package/rules/.source/ESCore/src/location/ESLocationModule.harmony.ts +23 -0
- package/rules/.source/ESCore/src/location/ESLocationModule.ts +8 -0
- package/rules/.source/ESCore/src/location/index.ts +4 -0
- package/rules/.source/ESCore/src/log/ESLog.ts +163 -0
- package/rules/.source/ESCore/src/log/ESLogModule.android.ts +51 -0
- package/rules/.source/ESCore/src/log/ESLogModule.harmony.ts +52 -0
- package/rules/.source/ESCore/src/log/ESLogModule.ts +18 -0
- package/rules/.source/ESCore/src/log/index.ts +3 -0
- package/rules/.source/ESCore/src/network/ESNetwork.ts +102 -0
- package/rules/.source/ESCore/src/network/ESNetworkInfo.ts +20 -0
- package/rules/.source/ESCore/src/network/ESNetworkInfoState.ts +8 -0
- package/rules/.source/ESCore/src/network/ESNetworkInfoType.ts +6 -0
- package/rules/.source/ESCore/src/network/ESNetworkListener.ts +5 -0
- package/rules/.source/ESCore/src/network/ESNetworkModule.android.ts +38 -0
- package/rules/.source/ESCore/src/network/ESNetworkModule.harmony.ts +122 -0
- package/rules/.source/ESCore/src/network/ESNetworkModule.ts +13 -0
- package/rules/.source/ESCore/src/network/ESWifiInfo.ts +6 -0
- package/rules/.source/ESCore/src/network/index.ts +9 -0
- package/rules/.source/ESCore/src/page/ESPageParams.ts +14 -0
- package/rules/.source/ESCore/src/page/index.ts +1 -0
- package/rules/.source/ESCore/src/permission/ESPermission.ts +46 -0
- package/rules/.source/ESCore/src/permission/ESPermissionModule.android.ts +33 -0
- package/rules/.source/ESCore/src/permission/ESPermissionModule.harmony.ts +33 -0
- package/rules/.source/ESCore/src/permission/ESPermissionModule.ts +12 -0
- package/rules/.source/ESCore/src/permission/ESRequestPermissionsResult.ts +6 -0
- package/rules/.source/ESCore/src/permission/index.ts +3 -0
- package/rules/.source/ESCore/src/platform/ESPlatform.ts +63 -0
- package/rules/.source/ESCore/src/platform/index.ts +1 -0
- package/rules/.source/ESCore/src/plugin/ESPlugin.ts +152 -0
- package/rules/.source/ESCore/src/plugin/ESPluginModule.android.ts +20 -0
- package/rules/.source/ESCore/src/plugin/ESPluginModule.harmony.ts +24 -0
- package/rules/.source/ESCore/src/plugin/ESPluginModule.ts +9 -0
- package/rules/.source/ESCore/src/plugin/index.ts +3 -0
- package/rules/.source/ESCore/src/power/ESPower.ts +41 -0
- package/rules/.source/ESCore/src/power/ESPowerModule.android.ts +31 -0
- package/rules/.source/ESCore/src/power/ESPowerModule.harmony.ts +33 -0
- package/rules/.source/ESCore/src/power/ESPowerModule.ts +7 -0
- package/rules/.source/ESCore/src/power/index.ts +2 -0
- package/rules/.source/ESCore/src/provider/ESContentProvider.ts +82 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderInfo.ts +8 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderModule.android.ts +62 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderModule.harmony.ts +62 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderModule.ts +29 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderResult.ts +4 -0
- package/rules/.source/ESCore/src/provider/ESContentValues.ts +3 -0
- package/rules/.source/ESCore/src/provider/index.ts +5 -0
- package/rules/.source/ESCore/src/router/ESData.ts +3 -0
- package/rules/.source/ESCore/src/router/ESParams.ts +3 -0
- package/rules/.source/ESCore/src/router/ESRouter.ts +364 -0
- package/rules/.source/ESCore/src/router/ESRouterKeyManager.android.ts +107 -0
- package/rules/.source/ESCore/src/router/ESRouterKeyManager.harmony.ts +205 -0
- package/rules/.source/ESCore/src/router/ESRouterKeyManager.ts +11 -0
- package/rules/.source/ESCore/src/router/ESRouterLifecycleManager.ts +301 -0
- package/rules/.source/ESCore/src/router/ESRouterManager.ts +221 -0
- package/rules/.source/ESCore/src/router/index.ts +9 -0
- package/rules/.source/ESCore/src/runtime/ESRuntime.ts +164 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.android.ts +76 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.harmony.ts +39 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.ts +14 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceType.ts +53 -0
- package/rules/.source/ESCore/src/runtime/index.ts +4 -0
- package/rules/.source/ESCore/src/service/ESService.ts +34 -0
- package/rules/.source/ESCore/src/service/ESServiceModule.android.ts +20 -0
- package/rules/.source/ESCore/src/service/ESServiceModule.harmony.ts +19 -0
- package/rules/.source/ESCore/src/service/ESServiceModule.ts +5 -0
- package/rules/.source/ESCore/src/service/index.ts +2 -0
- package/rules/.source/ESCore/src/share/ESShareData.ts +177 -0
- package/rules/.source/ESCore/src/share/ESShareDataModule.android.ts +370 -0
- package/rules/.source/ESCore/src/share/ESShareDataModule.harmony.ts +201 -0
- package/rules/.source/ESCore/src/share/ESShareDataModule.ts +83 -0
- package/rules/.source/ESCore/src/share/ESSharedData.ts +9 -0
- package/rules/.source/ESCore/src/share/ESSharedDataMode.ts +5 -0
- package/rules/.source/ESCore/src/share/ESSharedDataParams.ts +4 -0
- package/rules/.source/ESCore/src/share/ESSharedDataType.ts +9 -0
- package/rules/.source/ESCore/src/share/index.ts +7 -0
- package/rules/.source/ESCore/src/slot/ESSlot.ts +75 -0
- package/rules/.source/ESCore/src/slot/ESSlotEvent.ts +4 -0
- package/rules/.source/ESCore/src/slot/ESSlotEventName.ts +3 -0
- package/rules/.source/ESCore/src/slot/ESSlotParams.ts +14 -0
- package/rules/.source/ESCore/src/slot/index.ts +3 -0
- package/rules/.source/ESCore/src/theme/ESTheme.ts +88 -0
- package/rules/.source/ESCore/src/theme/ESThemeListener.ts +3 -0
- package/rules/.source/ESCore/src/theme/index.ts +3 -0
- package/rules/.source/ESCore/src/toast/ESToast.ts +47 -0
- package/rules/.source/ESCore/src/toast/ESToastModule.android.ts +30 -0
- package/rules/.source/ESCore/src/toast/ESToastModule.harmony.ts +30 -0
- package/rules/.source/ESCore/src/toast/ESToastModule.ts +9 -0
- package/rules/.source/ESCore/src/toast/index.ts +2 -0
- package/rules/.source/ESCore/src/upload/ESUpload.ts +226 -0
- package/rules/.source/ESCore/src/upload/ESUploadInfo.ts +13 -0
- package/rules/.source/ESCore/src/upload/ESUploadListener.ts +21 -0
- package/rules/.source/ESCore/src/upload/ESUploadModule.android.ts +60 -0
- package/rules/.source/ESCore/src/upload/ESUploadModule.harmony.ts +51 -0
- package/rules/.source/ESCore/src/upload/ESUploadModule.ts +19 -0
- package/rules/.source/ESCore/src/upload/ESUploadState.ts +9 -0
- package/rules/.source/ESCore/src/upload/ESUploadStatus.ts +11 -0
- package/rules/.source/ESCore/src/upload/index.ts +6 -0
- package/rules/.source/ESCore/src/usb/ESUsbDevice.ts +112 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceInfo.ts +11 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceListener.ts +7 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.android.ts +62 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.harmony.ts +58 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.ts +23 -0
- package/rules/.source/ESCore/src/usb/index.ts +4 -0
- package/rules/.source/ESCore/src/useApi.ts +257 -0
- package/rules/.source/ESCore/src/xlog/ESLogUpload.ts +92 -0
- package/rules/.source/ESCore/src/xlog/ESLogUploadInfo.ts +12 -0
- package/rules/.source/ESCore/src/xlog/ESLogUploadListener.ts +7 -0
- package/rules/.source/ESCore/src/xlog/ESXLog.ts +130 -0
- package/rules/.source/ESCore/src/xlog/ESXLogModule.android.ts +74 -0
- package/rules/.source/ESCore/src/xlog/ESXLogModule.harmony.ts +47 -0
- package/rules/.source/ESCore/src/xlog/ESXLogModule.ts +24 -0
- package/rules/.source/ESCore/src/xlog/index.ts +6 -0
- package/rules/.source/ESCore/tsconfig.json +34 -0
- package/rules/.source/ESPlayer/package.json +24 -0
- package/rules/.source/ESPlayer/rollup.config.js +28 -0
- package/rules/.source/ESPlayer/src/cache/ESPlayerCache.ts +14 -0
- package/rules/.source/ESPlayer/src/cache/ESPlayerCacheManager.ts +39 -0
- package/rules/.source/ESPlayer/src/core/ESIPlayer.ts +179 -0
- package/rules/.source/ESPlayer/src/core/ESIPlayerManager.ts +7 -0
- package/rules/.source/ESPlayer/src/core/ESMediaMetadata.ts +8 -0
- package/rules/.source/ESPlayer/src/core/ESMediaSource.ts +13 -0
- package/rules/.source/ESPlayer/src/core/ESMediaSourceList.ts +15 -0
- package/rules/.source/ESPlayer/src/core/ESPlayer.ts +100 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerBufferPercentCallback.ts +3 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerCDNInfo.ts +5 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerCommand.ts +1 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerComponentInfo.ts +7 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerConfiguration.ts +13 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerControlOptions.ts +8 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerDurationCallback.ts +3 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerMediaMeta.ts +48 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerPosition.ts +5 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerProgressCallback.ts +3 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerState.ts +44 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerStatus.ts +10 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerTrackInfo.ts +36 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerTrackType.ts +5 -0
- package/rules/.source/ESPlayer/src/core/M3U8DefinitionInfo.ts +38 -0
- package/rules/.source/ESPlayer/src/decode/ESPlayerDecode.ts +12 -0
- package/rules/.source/ESPlayer/src/decode/ESPlayerDecodeManager.ts +81 -0
- package/rules/.source/ESPlayer/src/definition/ESPlayerDefinition.ts +21 -0
- package/rules/.source/ESPlayer/src/definition/ESPlayerDefinitionManager.ts +93 -0
- package/rules/.source/ESPlayer/src/definition/ESPlayerDefinitionStrategy.ts +12 -0
- package/rules/.source/ESPlayer/src/device/ESPlayerDevice.ts +4 -0
- package/rules/.source/ESPlayer/src/device/ESPlayerDeviceManager.ts +41 -0
- package/rules/.source/ESPlayer/src/device/ESPlayerDeviceType.ts +53 -0
- package/rules/.source/ESPlayer/src/display/ESPlayerDisplay.ts +4 -0
- package/rules/.source/ESPlayer/src/display/ESPlayerDisplayManager.ts +63 -0
- package/rules/.source/ESPlayer/src/error/ESPlayerError.ts +5 -0
- package/rules/.source/ESPlayer/src/error/ESPlayerErrors.ts +8 -0
- package/rules/.source/ESPlayer/src/event/ESPlayerEventDefaultListener.ts +127 -0
- package/rules/.source/ESPlayer/src/event/ESPlayerEventListener.ts +120 -0
- package/rules/.source/ESPlayer/src/event/ESPlayerEventManager.ts +451 -0
- package/rules/.source/ESPlayer/src/index.ts +166 -0
- package/rules/.source/ESPlayer/src/info/ESPlayerInfo.ts +16 -0
- package/rules/.source/ESPlayer/src/injectionSymbols.ts +84 -0
- package/rules/.source/ESPlayer/src/interceptor/ESIPlayerInterceptor.ts +11 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptError.ts +8 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptResult.ts +8 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptorManager.ts +95 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptorType.ts +17 -0
- package/rules/.source/ESPlayer/src/log/ESPlayerLog.ts +143 -0
- package/rules/.source/ESPlayer/src/log/ESPlayerLogModule.ts +43 -0
- package/rules/.source/ESPlayer/src/mode/ESPlayerPlayMode.ts +8 -0
- package/rules/.source/ESPlayer/src/mode/ESPlayerPlayModeManager.ts +39 -0
- package/rules/.source/ESPlayer/src/option/ESPlayerOption.ts +11 -0
- package/rules/.source/ESPlayer/src/option/ESPlayerOptionType.ts +14 -0
- package/rules/.source/ESPlayer/src/rate/ESPlayerRate.ts +11 -0
- package/rules/.source/ESPlayer/src/rate/ESPlayerRateManager.ts +39 -0
- package/rules/.source/ESPlayer/src/ratio/ESPlayerAspectRatio.ts +9 -0
- package/rules/.source/ESPlayer/src/ratio/ESPlayerAspectRatioManager.ts +39 -0
- package/rules/.source/ESPlayer/src/render/ESPlayerRender.ts +5 -0
- package/rules/.source/ESPlayer/src/render/ESPlayerRenderManager.ts +36 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageManager.ts +97 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.android.ts +111 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.harmony.ts +111 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.ts +21 -0
- package/rules/.source/ESPlayer/src/type/ESPlayerType.ts +18 -0
- package/rules/.source/ESPlayer/src/type/ESPlayerTypeManager.ts +81 -0
- package/rules/.source/ESPlayer/src/useApi.ts +108 -0
- package/rules/.source/ESPlayer/src/view/ESIPlayerView.ts +120 -0
- package/rules/.source/ESPlayer/src/view/ESPlayerDefaultView.ts +127 -0
- package/rules/.source/ESPlayer/src/view/ESPlayerViewManager.ts +453 -0
- package/rules/.source/ESPlayer/src/volume/ESPlayerVolume.ts +4 -0
- package/rules/.source/ESPlayer/src/volume/ESPlayerVolumeManager.ts +51 -0
- package/rules/.source/ESPlayer/src/window/ESPlayerWindowType.ts +5 -0
- package/rules/.source/ESPlayer/tsconfig.json +34 -0
- package/rules/.source/ESPlayer/yarn.lock +4 -0
- package/rules/.source/ESPlayerManager/package.json +24 -0
- package/rules/.source/ESPlayerManager/rollup.config.js +33 -0
- package/rules/.source/ESPlayerManager/src/core/ESBuiltinADPlayerType.ts +9 -0
- package/rules/.source/ESPlayerManager/src/core/ESBuiltinPlayerType.ts +8 -0
- package/rules/.source/ESPlayerManager/src/core/ESIPlayerManager.ts +71 -0
- package/rules/.source/ESPlayerManager/src/core/ESMediaItem.ts +47 -0
- package/rules/.source/ESPlayerManager/src/core/ESMediaItemList.ts +11 -0
- package/rules/.source/ESPlayerManager/src/core/ESPlayerManager.ts +41 -0
- package/rules/.source/ESPlayerManager/src/core/ESPlayerManagerConfiguration.ts +6 -0
- package/rules/.source/ESPlayerManager/src/core/ESPlayerManagerErrors.ts +6 -0
- package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventDefaultListener.ts +154 -0
- package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventListener.ts +37 -0
- package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventManager.ts +521 -0
- package/rules/.source/ESPlayerManager/src/index.ts +37 -0
- package/rules/.source/ESPlayerManager/src/index.vue +2676 -0
- package/rules/.source/ESPlayerManager/src/injectionSymbols.ts +16 -0
- package/rules/.source/ESPlayerManager/src/mode/ESPlayerManagerPlayModeManager.ts +27 -0
- package/rules/.source/ESPlayerManager/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESPlayerManager/src/useApi.ts +22 -0
- package/rules/.source/ESPlayerManager/src/utils/SparseArray.ts +103 -0
- package/rules/.source/ESPlayerManager/src/view/ESIPlayerManagerDefaultView.ts +167 -0
- package/rules/.source/ESPlayerManager/src/view/ESIPlayerManagerView.ts +44 -0
- package/rules/.source/ESPlayerManager/src/view/ESPlayerManagerViewManager.ts +517 -0
- package/rules/.source/ESPlayerManager/tsconfig.json +34 -0
- package/rules/.source/ESRouter/CHANGELOGG.md +899 -0
- package/rules/.source/ESRouter/SECURITY.md +20 -0
- package/rules/.source/ESRouter/api-extractor.json +49 -0
- package/rules/.source/ESRouter/index.js +7 -0
- package/rules/.source/ESRouter/nightwatch.conf.js +240 -0
- package/rules/.source/ESRouter/package.json +19 -0
- package/rules/.source/ESRouter/rollup.config.mjs +195 -0
- package/rules/.source/ESRouter/src/RouterLink.ts +358 -0
- package/rules/.source/ESRouter/src/RouterView.ts +794 -0
- package/rules/.source/ESRouter/src/SlotView.ts +477 -0
- package/rules/.source/ESRouter/src/config.ts +6 -0
- package/rules/.source/ESRouter/src/devtools.ts +576 -0
- package/rules/.source/ESRouter/src/encoding.ts +147 -0
- package/rules/.source/ESRouter/src/errors.ts +200 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouter.android.ts +100 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouter.harmony.ts +155 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouter.ts +24 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouterLaunchMode.ts +7 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouterSplash.ts +6 -0
- package/rules/.source/ESRouter/src/global.d.ts +15 -0
- package/rules/.source/ESRouter/src/globalExtensions.ts +83 -0
- package/rules/.source/ESRouter/src/history/common.ts +237 -0
- package/rules/.source/ESRouter/src/history/es.ts +278 -0
- package/rules/.source/ESRouter/src/history/hash.ts +46 -0
- package/rules/.source/ESRouter/src/history/html5.ts +354 -0
- package/rules/.source/ESRouter/src/history/index.ts +40 -0
- package/rules/.source/ESRouter/src/history/memory.ts +127 -0
- package/rules/.source/ESRouter/src/index.ts +131 -0
- package/rules/.source/ESRouter/src/injectionSymbols.ts +91 -0
- package/rules/.source/ESRouter/src/location.ts +251 -0
- package/rules/.source/ESRouter/src/log/RouterLog.ts +90 -0
- package/rules/.source/ESRouter/src/log/info.ts +9 -0
- package/rules/.source/ESRouter/src/matcher/index.ts +533 -0
- package/rules/.source/ESRouter/src/matcher/pathMatcher.ts +55 -0
- package/rules/.source/ESRouter/src/matcher/pathParserRanker.ts +369 -0
- package/rules/.source/ESRouter/src/matcher/pathTokenizer.ts +200 -0
- package/rules/.source/ESRouter/src/matcher/types.ts +131 -0
- package/rules/.source/ESRouter/src/navigationGuards.ts +409 -0
- package/rules/.source/ESRouter/src/page/PageRouteView.ts +11 -0
- package/rules/.source/ESRouter/src/page/PageView.ts +12 -0
- package/rules/.source/ESRouter/src/query.ts +149 -0
- package/rules/.source/ESRouter/src/result/RouteResult.ts +11 -0
- package/rules/.source/ESRouter/src/result/RouteResultCallback.ts +5 -0
- package/rules/.source/ESRouter/src/router.ts +1930 -0
- package/rules/.source/ESRouter/src/scrollBehavior.ts +194 -0
- package/rules/.source/ESRouter/src/slot/SlotRootView.ts +11 -0
- package/rules/.source/ESRouter/src/slot/SlotView.ts +11 -0
- package/rules/.source/ESRouter/src/types/index.ts +605 -0
- package/rules/.source/ESRouter/src/types/typeGuards.ts +9 -0
- package/rules/.source/ESRouter/src/types/utils.ts +77 -0
- package/rules/.source/ESRouter/src/useApi.ts +29 -0
- package/rules/.source/ESRouter/src/utils/callbacks.ts +24 -0
- package/rules/.source/ESRouter/src/utils/env.ts +1 -0
- package/rules/.source/ESRouter/src/utils/index.ts +60 -0
- package/rules/.source/ESRouter/src/warning.ts +9 -0
- package/rules/.source/ESRouter/tsconfig.json +37 -0
- package/rules/.source/ESSoundPoolPlayer/package.json +23 -0
- package/rules/.source/ESSoundPoolPlayer/rollup.config.js +33 -0
- package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolContentType.ts +7 -0
- package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolStreamType.ts +15 -0
- package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolUsage.ts +19 -0
- package/rules/.source/ESSoundPoolPlayer/src/index.ts +19 -0
- package/rules/.source/ESSoundPoolPlayer/src/index.vue +1564 -0
- package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModul.android.ts +133 -0
- package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModul.harmony.ts +119 -0
- package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModule.ts +48 -0
- package/rules/.source/ESSoundPoolPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESSoundPoolPlayer/tsconfig.json +34 -0
- package/rules/.source/ESVideoPlayer/package.json +26 -0
- package/rules/.source/ESVideoPlayer/rollup.config.js +33 -0
- package/rules/.source/ESVideoPlayer/src/component/ESVideoPlayerViewComponent.android.ts +948 -0
- package/rules/.source/ESVideoPlayer/src/component/ESVideoPlayerViewComponent.harmony.ts +763 -0
- package/rules/.source/ESVideoPlayer/src/index.ts +18 -0
- package/rules/.source/ESVideoPlayer/src/index.vue +2003 -0
- package/rules/.source/ESVideoPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESVideoPlayer/src/utils/ESVideoPlayerDefinitionUtils.ts +36 -0
- package/rules/.source/ESVideoPlayer/tsconfig.json +34 -0
- package/rules/.source/ESVideoPlayer/tsconfig.json.vite +0 -0
- package/rules/.source/ESVideoPlayer/tsconfig.node.json +0 -0
- package/rules/.source/ESVideoPlayer/vite.config.ts +29 -0
- package/rules/.source/ESVue/CHANGELOG.MD +201 -0
- package/rules/.source/ESVue/api-extractor.json +41 -0
- package/rules/.source/ESVue/package.json +42 -0
- package/rules/.source/ESVue/rollup.config.js +40 -0
- package/rules/.source/ESVue/src/built-in-component.ts +650 -0
- package/rules/.source/ESVue/src/config/index.ts +109 -0
- package/rules/.source/ESVue/src/global.d.ts +636 -0
- package/rules/.source/ESVue/src/hooks/lifecycle.ts +248 -0
- package/rules/.source/ESVue/src/index.ts +365 -0
- package/rules/.source/ESVue/src/modules/attrs.ts +24 -0
- package/rules/.source/ESVue/src/modules/class.ts +31 -0
- package/rules/.source/ESVue/src/modules/events.ts +119 -0
- package/rules/.source/ESVue/src/modules/patch-log.ts +39 -0
- package/rules/.source/ESVue/src/modules/style.ts +68 -0
- package/rules/.source/ESVue/src/node-ops.ts +153 -0
- package/rules/.source/ESVue/src/patch-prop.ts +93 -0
- package/rules/.source/ESVue/src/runtime/component/index.ts +83 -0
- package/rules/.source/ESVue/src/runtime/document/hippy-document.ts +56 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-comment-element.ts +21 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-element.ts +1623 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-input-element.ts +75 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-list-element.ts +306 -0
- package/rules/.source/ESVue/src/runtime/event/event-bus.ts +148 -0
- package/rules/.source/ESVue/src/runtime/event/hippy-event-dispatcher.ts +391 -0
- package/rules/.source/ESVue/src/runtime/event/hippy-event-target.ts +191 -0
- package/rules/.source/ESVue/src/runtime/event/hippy-event.ts +317 -0
- package/rules/.source/ESVue/src/runtime/native/index.ts +924 -0
- package/rules/.source/ESVue/src/runtime/node/hippy-node.ts +722 -0
- package/rules/.source/ESVue/src/runtime/node/node-log.ts +39 -0
- package/rules/.source/ESVue/src/runtime/render/index.ts +550 -0
- package/rules/.source/ESVue/src/runtime/style/css-map.ts +100 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-auto-style.ts +119 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-percent-style.ts +111 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-rem-style.ts +45 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-scale-style.ts +103 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-style.ts +24 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-variables.ts +209 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-vwvh-style.ts +65 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-width-height-style.ts +18 -0
- package/rules/.source/ESVue/src/runtime/style/css-selectors-match.ts +295 -0
- package/rules/.source/ESVue/src/runtime/style/css-selectors.ts +1173 -0
- package/rules/.source/ESVue/src/runtime/style/index.ts +154 -0
- package/rules/.source/ESVue/src/runtime/style/log.ts +39 -0
- package/rules/.source/ESVue/src/runtime/style/parser.ts +291 -0
- package/rules/.source/ESVue/src/runtime/text/hippy-text.ts +41 -0
- package/rules/.source/ESVue/src/runtime/websocket/websocket.ts +282 -0
- package/rules/.source/ESVue/src/types/index.ts +25 -0
- package/rules/.source/ESVue/src/types/native-modules/clip-board-module.ts +24 -0
- package/rules/.source/ESVue/src/types/native-modules/device-event-module.ts +24 -0
- package/rules/.source/ESVue/src/types/native-modules/http.ts +57 -0
- package/rules/.source/ESVue/src/types/native-modules/image-loader-module.ts +27 -0
- package/rules/.source/ESVue/src/types/native-modules/net-info.ts +29 -0
- package/rules/.source/ESVue/src/types/native-modules/network.ts +24 -0
- package/rules/.source/ESVue/src/types/native-modules/test-module.ts +23 -0
- package/rules/.source/ESVue/src/types/native-modules/ui-manager-module.ts +44 -0
- package/rules/.source/ESVue/src/types/native-modules/websocket.ts +49 -0
- package/rules/.source/ESVue/src/types/native-modules.ts +41 -0
- package/rules/.source/ESVue/src/types/native-node.ts +48 -0
- package/rules/.source/ESVue/src/util/event.ts +74 -0
- package/rules/.source/ESVue/src/util/i18n.ts +32 -0
- package/rules/.source/ESVue/src/util/index.ts +418 -0
- package/rules/.source/ESVue/src/util/instance.ts +77 -0
- package/rules/.source/ESVue/src/util/log.ts +39 -0
- package/rules/.source/ESVue/src/util/node.ts +152 -0
- package/rules/.source/ESVue/src/util/rem.ts +54 -0
- package/rules/.source/ESVue/src/util/screen.ts +42 -0
- package/rules/.source/ESVue/tsconfig.json +34 -0
- package/rules/.source/ESVue/tsdoc.json +6 -0
- package/rules/.source/ESVue/yarn.lock +4 -0
- package/rules/.source/ESVueCssLoader/package.json +27 -0
- package/rules/.source/ESVueCssLoader/rollup.config.js +20 -0
- package/rules/.source/ESVueCssLoader/src/index.ts +2 -0
- package/rules/.source/ESVueCssLoader/src/log/log.ts +38 -0
- package/rules/.source/ESVueCssLoader/src/style-parser/color-parser.ts +357 -0
- package/rules/.source/ESVueCssLoader/src/style-parser/css-loader.ts +93 -0
- package/rules/.source/ESVueCssLoader/src/style-parser/css-parser.ts +1123 -0
- package/rules/.source/ESVueCssLoader/src/types.ts +5 -0
- package/rules/.source/ESVueCssLoader/src/utils/utils.ts +59 -0
- package/rules/.source/ESVueCssLoader/tsconfig.json +34 -0
- package/rules/.source/ESVueStyleParser/api-extractor.json +38 -0
- package/rules/.source/ESVueStyleParser/package.json +24 -0
- package/rules/.source/ESVueStyleParser/rollup.config.js +28 -0
- package/rules/.source/ESVueStyleParser/src/index.ts +24 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/android-color-parser.ts +143 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/color-parser.ts +256 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/css-parser.ts +1371 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/named-colors.ts +154 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/utils.ts +55 -0
- package/rules/.source/ESVueStyleParser/src/types.ts +5 -0
- package/rules/.source/ESVueStyleParser/tsconfig.json +34 -0
- package/rules/.source/component/package.json +24 -0
- package/rules/.source/component/rollup.config.js +28 -0
- package/rules/.source/component/src/ESAnimationView/ESAnimationViewComponent.ts +51 -0
- package/rules/.source/component/src/ESAppIconView/ESAppIconViewComponent.ts +46 -0
- package/rules/.source/component/src/ESAppIconView/ESIAppIcon.ts +5 -0
- package/rules/.source/component/src/ESCardView/ESCardContainerViewComponent.ts +127 -0
- package/rules/.source/component/src/ESCardView/ESCardEvent.ts +3 -0
- package/rules/.source/component/src/ESCardView/ESCardViewComponent.ts +54 -0
- package/rules/.source/component/src/ESCardView/ESICard.ts +9 -0
- package/rules/.source/component/src/ESCardView/ESICardContainer.ts +25 -0
- package/rules/.source/component/src/ESChartView/ESBarChartViewComponent.ts +35 -0
- package/rules/.source/component/src/ESChartView/ESIChart.ts +3 -0
- package/rules/.source/component/src/ESChartView/ESLineChartViewComponent.ts +35 -0
- package/rules/.source/component/src/ESDialog/ESDialogComponent.ts +15 -0
- package/rules/.source/component/src/ESFastSwiperSlideView/ESFastSwiperSlideViewComponent.ts +46 -0
- package/rules/.source/component/src/ESFlexView/ESFlexViewComponent.ts +22 -0
- package/rules/.source/component/src/ESGradient/ESGradient.ts +14 -0
- package/rules/.source/component/src/ESGradient/ESGradientOrientation.ts +10 -0
- package/rules/.source/component/src/ESGradient/ESGradientShape.ts +6 -0
- package/rules/.source/component/src/ESGradient/ESGradientType.ts +5 -0
- package/rules/.source/component/src/ESItem/ESItemComponent.ts +40 -0
- package/rules/.source/component/src/ESItemStoreView/ESItemStoreViewComponent.ts +23 -0
- package/rules/.source/component/src/ESLargeListView/ESLargeListViewComponent.ts +136 -0
- package/rules/.source/component/src/ESLoading/ESLoadingViewComponent.ts +16 -0
- package/rules/.source/component/src/ESLoading/ESLoadingViewElement.android.ts +11 -0
- package/rules/.source/component/src/ESLoading/ESLoadingViewElement.harmony.ts +11 -0
- package/rules/.source/component/src/ESLottieView/ESLottieViewComponent.android.ts +29 -0
- package/rules/.source/component/src/ESLottieView/ESLottieViewComponent.harmony.ts +29 -0
- package/rules/.source/component/src/ESMediaSeries/ESIMediaSeries.ts +24 -0
- package/rules/.source/component/src/ESMediaSeries/ESMediaSeries.ts +6 -0
- package/rules/.source/component/src/ESMediaSeries/ESMediaSeriesComponent.ts +142 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESHorizontalSeekBarViewComponent.ts +1305 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESIHorizontalSeekBar.ts +255 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESIVerticalSeekBar.ts +13 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESVerticalSeekBarViewComponent.ts +1356 -0
- package/rules/.source/component/src/ESPlayMarkView/ESPlayMarkViewComponent.ts +21 -0
- package/rules/.source/component/src/ESPluginView/ESPluginViewComponent.ts +34 -0
- package/rules/.source/component/src/ESProgressBarView/ESProgressBarViewComponent.ts +38 -0
- package/rules/.source/component/src/ESQRCodeView/ESQRCodeViewComponent.ts +11 -0
- package/rules/.source/component/src/ESReplaceChildView/ESReplaceChildViewComponent.ts +151 -0
- package/rules/.source/component/src/ESRippleView/ESRippleViewComponent.ts +45 -0
- package/rules/.source/component/src/ESScrollView/ESIScrollView.ts +7 -0
- package/rules/.source/component/src/ESScrollView/ESScrollViewComponent.ts +49 -0
- package/rules/.source/component/src/ESSeekBarView/ESSeekBarViewElement.android.ts +38 -0
- package/rules/.source/component/src/ESSeekBarView/ESSeekBarViewElement.harmony.ts +38 -0
- package/rules/.source/component/src/ESSurfaceView/ESSurfaceViewComponent.ts +21 -0
- package/rules/.source/component/src/ESSwiftListView/ESSwiftListViewComponent.ts +117 -0
- package/rules/.source/component/src/ESSwiperSlideView/ESSwiperSlideViewComponent.ts +31 -0
- package/rules/.source/component/src/ESSwiperView/ESSwiperViewComponent.ts +82 -0
- package/rules/.source/component/src/ESTVItemView/ESTVItemViewComponent.ts +185 -0
- package/rules/.source/component/src/ESTVListView/ESIListView.ts +184 -0
- package/rules/.source/component/src/ESTVListView/ESListInitPosition.ts +15 -0
- package/rules/.source/component/src/ESTVListView/ESListViewItem.ts +10 -0
- package/rules/.source/component/src/ESTVListView/ESListViewItemDecoration.ts +7 -0
- package/rules/.source/component/src/ESTVListView/ESListViewItemFunctionParams.ts +7 -0
- package/rules/.source/component/src/ESTVListView/ESTVListViewComponent.ts +697 -0
- package/rules/.source/component/src/ESTabsView/ESITab.ts +90 -0
- package/rules/.source/component/src/ESTabsView/ESTab.ts +7 -0
- package/rules/.source/component/src/ESTabsView/ESTabItem.ts +8 -0
- package/rules/.source/component/src/ESTabsView/ESTabsViewComponent.ts +383 -0
- package/rules/.source/component/src/ESTestView/ESITestAView.ts +1 -0
- package/rules/.source/component/src/ESTestView/ESITestGroup.ts +3 -0
- package/rules/.source/component/src/ESTestView/ESITestView.ts +3 -0
- package/rules/.source/component/src/ESTestView/ESTestAViewComponent.ts +34 -0
- package/rules/.source/component/src/ESTestView/ESTestGroupComponent.ts +39 -0
- package/rules/.source/component/src/ESTestView/ESTestViewComponent.ts +51 -0
- package/rules/.source/component/src/ESTextView/ESTextViewComponent.ts +22 -0
- package/rules/.source/component/src/ESTransitionImageView/ESITransitionImage.ts +7 -0
- package/rules/.source/component/src/ESTransitionImageView/ESTransitionImageViewComponent.ts +58 -0
- package/rules/.source/component/src/ESView/ESDirections.ts +7 -0
- package/rules/.source/component/src/ESView/ESIView.ts +6 -0
- package/rules/.source/component/src/ESView/ESViewComponent.ts +24 -0
- package/rules/.source/component/src/ESView/ESViewCoordinate.ts +4 -0
- package/rules/.source/component/src/ESView/ESViewScrollState.ts +5 -0
- package/rules/.source/component/src/ESView/ESViewState.ts +16 -0
- package/rules/.source/component/src/ESView/ESViewStateCallback.ts +5 -0
- package/rules/.source/component/src/ESViewPager/ESIViewPager.ts +8 -0
- package/rules/.source/component/src/ESViewPager/ESPageData.ts +7 -0
- package/rules/.source/component/src/ESViewPager/ESViewPagerComponent.ts +58 -0
- package/rules/.source/component/src/ESWebView/ESWebViewComponent.ts +48 -0
- package/rules/.source/component/src/ESX5WebView/ESX5WebViewElement.android.ts +70 -0
- package/rules/.source/component/src/ESX5WebView/ESX5WebViewElement.harmony.ts +70 -0
- package/rules/.source/component/src/index.ts +180 -0
- package/rules/.source/component/src/tv-div/TVDivComponent.ts +131 -0
- package/rules/.source/component/src/tv-image/TVImageComponent.ts +126 -0
- package/rules/.source/component/src/tv-li/TVLiComponent.ts +10 -0
- package/rules/.source/component/src/tv-swiper/TVSwiperComponent.ts +110 -0
- package/rules/.source/component/src/tv-ul/TVULComponent.ts +82 -0
- package/rules/.source/component/src/typings/index.ts +7 -0
- package/rules/.source/component/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/component/tsconfig.json +34 -0
- package/rules/.source/hippy/extend_views/CoverFlowHorizontalView.java +203 -0
- package/rules/.source/hippy/extend_views/CoverFlowVerticalView.java +203 -0
- package/rules/.source/hippy/extend_views/CoverFlowViewController.java +195 -0
- package/rules/.source/hippy/extend_views/EngineRootView.java +125 -0
- package/rules/.source/hippy/extend_views/ExtendTag.java +83 -0
- package/rules/.source/hippy/extend_views/FocusSearchHelper.java +124 -0
- package/rules/.source/hippy/extend_views/IRecyclerItemView.java +12 -0
- package/rules/.source/hippy/extend_views/JSEventHandleView.java +5 -0
- package/rules/.source/hippy/extend_views/MarqueeRelayManager.java +133 -0
- package/rules/.source/hippy/extend_views/MarqueeRelayTextView.java +211 -0
- package/rules/.source/hippy/extend_views/ProgressBarView.java +83 -0
- package/rules/.source/hippy/extend_views/ProgressBarViewController.java +145 -0
- package/rules/.source/hippy/extend_views/SeekBarView.java +104 -0
- package/rules/.source/hippy/extend_views/SeekBarViewController.java +218 -0
- package/rules/.source/hippy/extend_views/StateImageView.java +149 -0
- package/rules/.source/hippy/extend_views/StateImageViewController.java +34 -0
- package/rules/.source/hippy/extend_views/TVButtonView.java +314 -0
- package/rules/.source/hippy/extend_views/TVButtonViewController.java +89 -0
- package/rules/.source/hippy/extend_views/TVTextView.java +684 -0
- package/rules/.source/hippy/extend_views/TVViewActor.java +811 -0
- package/rules/.source/hippy/extend_views/TVViewActorHost.java +6 -0
- package/rules/.source/hippy/extend_views/TVViewActor/346/216/245/345/205/245.md +66 -0
- package/rules/.source/hippy/extend_views/TemplateUtil.java +336 -0
- package/rules/.source/hippy/extend_views/TextButtonNode.java +47 -0
- package/rules/.source/hippy/extend_views/TextViewController.java +377 -0
- package/rules/.source/hippy/extend_views/fastlist/CenterFlyInAnimator.java +96 -0
- package/rules/.source/hippy/extend_views/fastlist/ChildOnScreenScroller.java +548 -0
- package/rules/.source/hippy/extend_views/fastlist/ClonedViewTag.java +17 -0
- package/rules/.source/hippy/extend_views/fastlist/EventDeliverer.java +55 -0
- package/rules/.source/hippy/extend_views/fastlist/FastAdapter.java +4683 -0
- package/rules/.source/hippy/extend_views/fastlist/FastAdapterUtil.java +982 -0
- package/rules/.source/hippy/extend_views/fastlist/FastFlexNode.java +48 -0
- package/rules/.source/hippy/extend_views/fastlist/FastFlexView.java +873 -0
- package/rules/.source/hippy/extend_views/fastlist/FastFlexViewController.java +130 -0
- package/rules/.source/hippy/extend_views/fastlist/FastItemNode.java +67 -0
- package/rules/.source/hippy/extend_views/fastlist/FastItemView.java +306 -0
- package/rules/.source/hippy/extend_views/fastlist/FastItemViewController.java +106 -0
- package/rules/.source/hippy/extend_views/fastlist/FastListModule.java +95 -0
- package/rules/.source/hippy/extend_views/fastlist/FastListNode.java +90 -0
- package/rules/.source/hippy/extend_views/fastlist/FastListView.java +2466 -0
- package/rules/.source/hippy/extend_views/fastlist/FastListViewController.java +1038 -0
- package/rules/.source/hippy/extend_views/fastlist/FastListView/346/270/262/346/237/223/346/265/201/347/250/213/345/233/276.graffle +0 -0
- package/rules/.source/hippy/extend_views/fastlist/FastPendingView.java +47 -0
- package/rules/.source/hippy/extend_views/fastlist/ItemDecorations.java +71 -0
- package/rules/.source/hippy/extend_views/fastlist/ItemStoreNode.java +64 -0
- package/rules/.source/hippy/extend_views/fastlist/ItemStoreView.java +13 -0
- package/rules/.source/hippy/extend_views/fastlist/ItemStoreViewController.java +45 -0
- package/rules/.source/hippy/extend_views/fastlist/ListItemHolder.java +7 -0
- package/rules/.source/hippy/extend_views/fastlist/ListViewControlProp.java +41 -0
- package/rules/.source/hippy/extend_views/fastlist/MouseRecycleView.java +509 -0
- package/rules/.source/hippy/extend_views/fastlist/OnFastItemClickListener.java +12 -0
- package/rules/.source/hippy/extend_views/fastlist/OnFastItemFocusChangeListener.java +9 -0
- package/rules/.source/hippy/extend_views/fastlist/OnFastScrollStateChangedListener.java +7 -0
- package/rules/.source/hippy/extend_views/fastlist/PendingListNode.java +18 -0
- package/rules/.source/hippy/extend_views/fastlist/PendingViewController.java +13 -0
- package/rules/.source/hippy/extend_views/fastlist/PostHandlerView.java +6 -0
- package/rules/.source/hippy/extend_views/fastlist/PostTaskHolder.java +20 -0
- package/rules/.source/hippy/extend_views/fastlist/ReplaceChildController.java +105 -0
- package/rules/.source/hippy/extend_views/fastlist/ReplaceChildView.java +312 -0
- package/rules/.source/hippy/extend_views/fastlist/TVListView.java +3692 -0
- package/rules/.source/hippy/extend_views/fastlist/TemplateCodeParser.java +247 -0
- package/rules/.source/hippy/extend_views/fastlist/Utils.java +572 -0
- package/rules/.source/hippy/extend_views/fastlist/ViewTag.java +317 -0
- package/rules/.source/hippy/extend_views/fastlist/VirtualListView.java +8 -0
- package/rules/.source/hippy/extend_views/fastlist/diff/FastListDataBindingHelper.java +320 -0
- package/rules/.source/hippy/extend_views/fastlist/diff/KeyDiffHelper.java +289 -0
- package/rules/.source/hippy/extend_views/fastlist/diff/NoKeyDiffHelper.java +278 -0
- package/rules/.source/hippy/extend_views/tag/FontTag.java +53 -0
- package/rules/.source/hippy/extend_views/tag/HtmlTag.java +191 -0
- package/rules/.source/hippy/extend_views/tag/HtmlTagHandler.java +185 -0
- package/rules/.source/hippy/extend_views/tag/SpanTag.java +160 -0
- package/rules/.source/hippy/extend_views/tag/TextFontSpan.java +102 -0
- package/rules/.source/hippy/extend_views/waterfall/Chunk.java +10 -0
- package/rules/.source/hippy/extend_views/waterfall/ChunkGroup.java +5 -0
- package/rules/.source/hippy/extend_views/waterfall/Section.java +4 -0
- package/rules/.source/hippy/extend_views/waterfall/Tabs.java +5 -0
- package/rules/.source/hippy/extend_views/waterfall/WaterfallUtils.java +26 -0
- package/rules/.source/hippy/hippy_uimanager/ControllerHolder.java +30 -0
- package/rules/.source/hippy/hippy_uimanager/ControllerManager.java +651 -0
- package/rules/.source/hippy/hippy_uimanager/ControllerRegistry.java +102 -0
- package/rules/.source/hippy/hippy_uimanager/ControllerUpdateManger.java +252 -0
- package/rules/.source/hippy/hippy_uimanager/CustomControllerHelper.java +425 -0
- package/rules/.source/hippy/hippy_uimanager/DiffUtils.java +526 -0
- package/rules/.source/hippy/hippy_uimanager/ExtendViewGroup.java +36 -0
- package/rules/.source/hippy/hippy_uimanager/HippyCustomViewCreator.java +29 -0
- package/rules/.source/hippy/hippy_uimanager/HippyGroupController.java +83 -0
- package/rules/.source/hippy/hippy_uimanager/HippyViewBase.java +27 -0
- package/rules/.source/hippy/hippy_uimanager/HippyViewController.java +2189 -0
- package/rules/.source/hippy/hippy_uimanager/HippyViewEvent.java +52 -0
- package/rules/.source/hippy/hippy_uimanager/IHippyZIndexViewGroup.java +24 -0
- package/rules/.source/hippy/hippy_uimanager/InternalExtendViewUtil.java +395 -0
- package/rules/.source/hippy/hippy_uimanager/ListItemRenderNode.java +143 -0
- package/rules/.source/hippy/hippy_uimanager/ListViewRenderNode.java +44 -0
- package/rules/.source/hippy/hippy_uimanager/MatrixUtil.java +470 -0
- package/rules/.source/hippy/hippy_uimanager/NativeGestureDispatcher.java +349 -0
- package/rules/.source/hippy/hippy_uimanager/NativeGestureProcessor.java +188 -0
- package/rules/.source/hippy/hippy_uimanager/PullFooterRenderNode.java +43 -0
- package/rules/.source/hippy/hippy_uimanager/PullHeaderRenderNode.java +43 -0
- package/rules/.source/hippy/hippy_uimanager/RenderManager.java +304 -0
- package/rules/.source/hippy/hippy_uimanager/RenderNode.java +533 -0
- package/rules/.source/hippy/hippy_uimanager/StateView.java +17 -0
- package/rules/.source/hippy/hippy_uimanager/TransformUtil.java +125 -0
- package/rules/.source/hippy/hippy_uimanager/ViewGroupDrawingOrderHelper.java +108 -0
- package/rules/.source/hippy/hippy_uimanager/ViewStateProvider.java +10 -0
- package/rules/.source/hippy/hippy_views/audioview/AudioPlayManager.java +457 -0
- package/rules/.source/hippy/hippy_views/audioview/AudioView.java +225 -0
- package/rules/.source/hippy/hippy_views/audioview/AudioViewController.java +135 -0
- package/rules/.source/hippy/hippy_views/common/CommonBackgroundDrawable.java +58 -0
- package/rules/.source/hippy/hippy_views/common/CommonBorder.java +37 -0
- package/rules/.source/hippy/hippy_views/custom/HippyCustomPropsController.java +61 -0
- package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerListAdapter.java +399 -0
- package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerView.java +378 -0
- package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerViewController.java +187 -0
- package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerViewHolder.java +39 -0
- package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerViewWrapper.java +134 -0
- package/rules/.source/hippy/hippy_views/hippylist/NodePositionHelper.java +55 -0
- package/rules/.source/hippy/hippy_views/hippylist/PreloadHelper.java +54 -0
- package/rules/.source/hippy/hippy_views/hippylist/PullFooterEventHelper.java +61 -0
- package/rules/.source/hippy/hippy_views/hippylist/PullHeaderEventHelper.java +127 -0
- package/rules/.source/hippy/hippy_views/hippylist/RecyclerViewEventHelper.java +394 -0
- package/rules/.source/hippy/hippy_views/image/HippyContentDrawable.java +113 -0
- package/rules/.source/hippy/hippy_views/image/HippyImageView.java +1608 -0
- package/rules/.source/hippy/hippy_views/image/HippyImageViewController.java +382 -0
- package/rules/.source/hippy/hippy_views/image/IImageStateListener.java +7 -0
- package/rules/.source/hippy/hippy_views/list/ChildOnScreenScroller.java +255 -0
- package/rules/.source/hippy/hippy_views/list/HippyListAdapter.java +647 -0
- package/rules/.source/hippy/hippy_views/list/HippyListItemView.java +162 -0
- package/rules/.source/hippy/hippy_views/list/HippyListItemViewController.java +45 -0
- package/rules/.source/hippy/hippy_views/list/HippyListView.java +915 -0
- package/rules/.source/hippy/hippy_views/list/HippyListViewController.java +622 -0
- package/rules/.source/hippy/hippy_views/list/HippyRecycler.java +31 -0
- package/rules/.source/hippy/hippy_views/list/IRecycleItemTypeChange.java +23 -0
- package/rules/.source/hippy/hippy_views/list/ItemDecorations.java +70 -0
- package/rules/.source/hippy/hippy_views/list/NegativeLongKeyFlinger.java +156 -0
- package/rules/.source/hippy/hippy_views/list/NodeHolder.java +34 -0
- package/rules/.source/hippy/hippy_views/list/RecycleViewFlinger.java +126 -0
- package/rules/.source/hippy/hippy_views/list/TVRecyclerView.java +2070 -0
- package/rules/.source/hippy/hippy_views/list/TVSingleLineListView.java +15 -0
- package/rules/.source/hippy/hippy_views/modal/HippyModalHostManager.java +102 -0
- package/rules/.source/hippy/hippy_views/modal/HippyModalHostView.java +597 -0
- package/rules/.source/hippy/hippy_views/modal/ModalHostHelper.java +46 -0
- package/rules/.source/hippy/hippy_views/modal/ModalStyleNode.java +34 -0
- package/rules/.source/hippy/hippy_views/modal/RequestCloseEvent.java +32 -0
- package/rules/.source/hippy/hippy_views/modal/ShowEvent.java +31 -0
- package/rules/.source/hippy/hippy_views/navigator/Navigator.java +126 -0
- package/rules/.source/hippy/hippy_views/navigator/NavigatorController.java +120 -0
- package/rules/.source/hippy/hippy_views/refresh/HippyPullFooterView.java +47 -0
- package/rules/.source/hippy/hippy_views/refresh/HippyPullFooterViewController.java +65 -0
- package/rules/.source/hippy/hippy_views/refresh/HippyPullHeaderView.java +39 -0
- package/rules/.source/hippy/hippy_views/refresh/HippyPullHeaderViewController.java +104 -0
- package/rules/.source/hippy/hippy_views/refresh/RefreshWrapper.java +237 -0
- package/rules/.source/hippy/hippy_views/refresh/RefreshWrapperController.java +62 -0
- package/rules/.source/hippy/hippy_views/refresh/RefreshWrapperItemController.java +39 -0
- package/rules/.source/hippy/hippy_views/refresh/RefreshWrapperItemView.java +26 -0
- package/rules/.source/hippy/hippy_views/scroll/HippyHorizontalScrollView.java +500 -0
- package/rules/.source/hippy/hippy_views/scroll/HippyOnScrollHelper.java +39 -0
- package/rules/.source/hippy/hippy_views/scroll/HippyScrollView.java +46 -0
- package/rules/.source/hippy/hippy_views/scroll/HippyScrollViewController.java +178 -0
- package/rules/.source/hippy/hippy_views/scroll/HippyScrollViewEventHelper.java +92 -0
- package/rules/.source/hippy/hippy_views/scroll/HippyVerticalScrollView.java +522 -0
- package/rules/.source/hippy/hippy_views/text/HippyTextView.java +512 -0
- package/rules/.source/hippy/hippy_views/text/HippyTextViewController.java +77 -0
- package/rules/.source/hippy/hippy_views/textinput/HippyTextInput.java +668 -0
- package/rules/.source/hippy/hippy_views/textinput/HippyTextInputController.java +528 -0
- package/rules/.source/hippy/hippy_views/textinput/TextInputNode.java +115 -0
- package/rules/.source/hippy/hippy_views/videoview/APEZProvider.java +287 -0
- package/rules/.source/hippy/hippy_views/videoview/APKExpansionSupport.java +82 -0
- package/rules/.source/hippy/hippy_views/videoview/PivotPoint.java +13 -0
- package/rules/.source/hippy/hippy_views/videoview/ScalableType.java +34 -0
- package/rules/.source/hippy/hippy_views/videoview/ScalableVideoView.java +265 -0
- package/rules/.source/hippy/hippy_views/videoview/ScaleManager.java +191 -0
- package/rules/.source/hippy/hippy_views/videoview/Size.java +19 -0
- package/rules/.source/hippy/hippy_views/videoview/VideoHippyView.java +917 -0
- package/rules/.source/hippy/hippy_views/videoview/VideoHippyViewController.java +236 -0
- package/rules/.source/hippy/hippy_views/videoview/ZipResourceFile.java +427 -0
- package/rules/.source/hippy/hippy_views/view/CardRootView.java +28 -0
- package/rules/.source/hippy/hippy_views/view/CustomLayoutView.java +10 -0
- package/rules/.source/hippy/hippy_views/view/CustomNodeView.java +5 -0
- package/rules/.source/hippy/hippy_views/view/DialogViewGroup.java +113 -0
- package/rules/.source/hippy/hippy_views/view/HippyViewGroup.java +2042 -0
- package/rules/.source/hippy/hippy_views/view/HippyViewGroupController.java +583 -0
- package/rules/.source/hippy/hippy_views/view/WindowRoot.java +5 -0
- package/rules/.source/hippy/hippy_views/viewpager/HippyViewPager.java +308 -0
- package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerAdapter.java +148 -0
- package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerController.java +246 -0
- package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerItem.java +27 -0
- package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerItemController.java +42 -0
- package/rules/.source/hippy/hippy_views/viewpager/ViewPagerPageChangeListener.java +114 -0
- package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageItemExposureEvent.java +40 -0
- package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageScrollEvent.java +43 -0
- package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageScrollStateChangedEvent.java +42 -0
- package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageSelectedEvent.java +42 -0
- package/rules/.source/hippy/hippy_views/webview/HippyWebView.java +160 -0
- package/rules/.source/hippy/hippy_views/webview/HippyWebViewBridge.java +20 -0
- package/rules/.source/hippy/hippy_views/webview/HippyWebViewController.java +103 -0
- package/rules/.source/hippy/hippy_views/webview/HippyWebViewInner.java +77 -0
- package/rules/.source/quicktvui/assets/ic_media_sereis_vip.png +0 -0
- package/rules/.source/quicktvui/package.json +38 -0
- package/rules/.source/quicktvui/rollup.config.js +33 -0
- package/rules/.source/quicktvui/src/animation/QTAnimation.android.ts +1139 -0
- package/rules/.source/quicktvui/src/animation/QTAnimation.harmony.ts +1088 -0
- package/rules/.source/quicktvui/src/animation/QTIAnimation.ts +336 -0
- package/rules/.source/quicktvui/src/animation/QtAnimationAPI.ts +467 -0
- package/rules/.source/quicktvui/src/animation/types.ts +97 -0
- package/rules/.source/quicktvui/src/app/QTAppIcon.ts +41 -0
- package/rules/.source/quicktvui/src/app/QTIAppIcon.ts +5 -0
- package/rules/.source/quicktvui/src/app/QtAppIconAPI.ts +56 -0
- package/rules/.source/quicktvui/src/assets/vip.png +0 -0
- package/rules/.source/quicktvui/src/base/QTIBaseView.ts +95 -0
- package/rules/.source/quicktvui/src/base/QtBaseNativeViewAPI.ts +604 -0
- package/rules/.source/quicktvui/src/base/QtBaseViewAPI.ts +750 -0
- package/rules/.source/quicktvui/src/base/useBaseView.ts +374 -0
- package/rules/.source/quicktvui/src/button/QTIButton.ts +3 -0
- package/rules/.source/quicktvui/src/button/QtButtonAPI.ts +9 -0
- package/rules/.source/quicktvui/src/button/index.vue +223 -0
- package/rules/.source/quicktvui/src/canvas/CanvasGradient.ts +84 -0
- package/rules/.source/quicktvui/src/canvas/QTCanvasView.ts +468 -0
- package/rules/.source/quicktvui/src/canvas/QTICanvasView.ts +141 -0
- package/rules/.source/quicktvui/src/canvas/QtCanvasViewAPI.ts +1140 -0
- package/rules/.source/quicktvui/src/classified-list-view/QtClassifiedListViewAPI.ts +115 -0
- package/rules/.source/quicktvui/src/classified-list-view/core/QTClassifiedListViewItem.ts +11 -0
- package/rules/.source/quicktvui/src/classified-list-view/core/QTClassifiedListViewItemDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/classified-list-view/core/QTIClassifiedListView.ts +18 -0
- package/rules/.source/quicktvui/src/classified-list-view/index.vue +520 -0
- package/rules/.source/quicktvui/src/collapse/QtCollapseAPI.ts +60 -0
- package/rules/.source/quicktvui/src/collapse/core/QTCollapse.ts +13 -0
- package/rules/.source/quicktvui/src/collapse/core/QTCollapseItem.ts +7 -0
- package/rules/.source/quicktvui/src/collapse/core/QTICollapse.ts +15 -0
- package/rules/.source/quicktvui/src/collapse/core/QTICollapseItem.ts +5 -0
- package/rules/.source/quicktvui/src/collapse/index.vue +337 -0
- package/rules/.source/quicktvui/src/column/QTIColumn.ts +3 -0
- package/rules/.source/quicktvui/src/column/QtColumnAPI.ts +9 -0
- package/rules/.source/quicktvui/src/column/index.vue +29 -0
- package/rules/.source/quicktvui/src/core/QTEventData.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleBackground.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleCoordinate.ts +5 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleGradientBackground.ts +6 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleMargin.ts +8 -0
- package/rules/.source/quicktvui/src/core/QTFlexStylePadding.ts +8 -0
- package/rules/.source/quicktvui/src/core/QTFlexStylePosition.ts +7 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleSize.ts +6 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleSpacing.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleText.ts +5 -0
- package/rules/.source/quicktvui/src/core/QTFocusable.ts +5 -0
- package/rules/.source/quicktvui/src/core/QTLocation.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTNativeParams.ts +22 -0
- package/rules/.source/quicktvui/src/core/QTPosition.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTVisibility.ts +5 -0
- package/rules/.source/quicktvui/src/dialog/QTDialog.ts +28 -0
- package/rules/.source/quicktvui/src/dialog/QTIDialog.ts +3 -0
- package/rules/.source/quicktvui/src/file-browse/QTFileBrowse.ts +76 -0
- package/rules/.source/quicktvui/src/file-browse/QTIFileBrowse.ts +13 -0
- package/rules/.source/quicktvui/src/focus/QTDescendantFocusability.ts +5 -0
- package/rules/.source/quicktvui/src/focus/QTFocusDescendant.ts +5 -0
- package/rules/.source/quicktvui/src/focus/QTFocusDirection.ts +8 -0
- package/rules/.source/quicktvui/src/focus/QTFocusDirectionName.ts +7 -0
- package/rules/.source/quicktvui/src/gradient/QTGradient.ts +14 -0
- package/rules/.source/quicktvui/src/gradient/QTGradientOrientation.ts +10 -0
- package/rules/.source/quicktvui/src/gradient/QTGradientShape.ts +6 -0
- package/rules/.source/quicktvui/src/gradient/QTGradientType.ts +5 -0
- package/rules/.source/quicktvui/src/grid-view/QtGridViewAPI.ts +121 -0
- package/rules/.source/quicktvui/src/grid-view/README.md +93 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItem.ts +4 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItemDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItemFunctionParams.ts +7 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTIGridView.ts +23 -0
- package/rules/.source/quicktvui/src/grid-view/index.vue +390 -0
- package/rules/.source/quicktvui/src/image/QTIImage.ts +8 -0
- package/rules/.source/quicktvui/src/image/QTImageResizeMode.ts +7 -0
- package/rules/.source/quicktvui/src/image/QtImageAPI.ts +54 -0
- package/rules/.source/quicktvui/src/image/index.vue +33 -0
- package/rules/.source/quicktvui/src/index.ts +404 -0
- package/rules/.source/quicktvui/src/list/QTIBaseListView.ts +144 -0
- package/rules/.source/quicktvui/src/list/QTListInitPosition.ts +15 -0
- package/rules/.source/quicktvui/src/list/QtBaseListViewAPI.ts +930 -0
- package/rules/.source/quicktvui/src/list/useBaseListView.ts +454 -0
- package/rules/.source/quicktvui/src/list/useListView.ts +294 -0
- package/rules/.source/quicktvui/src/list-indicator/QTIndicatorListViewComponent.ts +553 -0
- package/rules/.source/quicktvui/src/list-indicator/QtIndicatorViewAPI.ts +114 -0
- package/rules/.source/quicktvui/src/list-indicator/core/QTIIndicatorView.ts +21 -0
- package/rules/.source/quicktvui/src/list-item/ESListItemComponent.ts +86 -0
- package/rules/.source/quicktvui/src/list-item/QTIListItem.ts +14 -0
- package/rules/.source/quicktvui/src/list-item/QtListItemAPI.ts +107 -0
- package/rules/.source/quicktvui/src/list-view/QTListViewComponent.ts +389 -0
- package/rules/.source/quicktvui/src/list-view/QtListViewAPI.ts +101 -0
- package/rules/.source/quicktvui/src/list-view/core/QTIListView.ts +19 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItem.ts +12 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItemDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItemFunctionParams.ts +7 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItemState.ts +8 -0
- package/rules/.source/quicktvui/src/loading/QTILoadingView.ts +3 -0
- package/rules/.source/quicktvui/src/loading/QTLoadingView.ts +25 -0
- package/rules/.source/quicktvui/src/loading/QtLoadingAPI.ts +9 -0
- package/rules/.source/quicktvui/src/long-image/QTILongImage.ts +68 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImage.ts +442 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImageEventBean.ts +62 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImageOrientation.ts +19 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImagePositionType.ts +5 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImageScaleType.ts +9 -0
- package/rules/.source/quicktvui/src/long-image/QtLongImageAPI.ts +9 -0
- package/rules/.source/quicktvui/src/long-image/index.vue +397 -0
- package/rules/.source/quicktvui/src/lottie/QTILottieView.ts +62 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieAsyncUpdates.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieEvent.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieRenderMode.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieRepeatMode.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieView.android.ts +207 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieView.harmony.ts +207 -0
- package/rules/.source/quicktvui/src/lottie/QtLottieViewAPI.ts +586 -0
- package/rules/.source/quicktvui/src/nav-bar/QTINavBar.ts +11 -0
- package/rules/.source/quicktvui/src/nav-bar/QTNavBar.ts +9 -0
- package/rules/.source/quicktvui/src/nav-bar/QTNavBarItem.ts +9 -0
- package/rules/.source/quicktvui/src/nav-bar/QTNavBarItemType.ts +3 -0
- package/rules/.source/quicktvui/src/nav-bar/QtNavBarAPI.ts +36 -0
- package/rules/.source/quicktvui/src/nav-bar/index.vue +220 -0
- package/rules/.source/quicktvui/src/plugin/QTIPluginView.ts +11 -0
- package/rules/.source/quicktvui/src/plugin/QTPluginView.ts +49 -0
- package/rules/.source/quicktvui/src/plugin/QtPluginViewAPI.ts +44 -0
- package/rules/.source/quicktvui/src/poster/QtPosterAPI.ts +9 -0
- package/rules/.source/quicktvui/src/poster/core/QTIPoster.ts +3 -0
- package/rules/.source/quicktvui/src/poster/core/QTPoster.ts +32 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterCorner.ts +9 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterElement.ts +8 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterImage.ts +7 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterPlaceholderImg.ts +4 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterRipple.ts +10 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterScore.ts +14 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterShadow.ts +4 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterShimmer.ts +4 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterTitle.ts +17 -0
- package/rules/.source/quicktvui/src/poster/index.vue +279 -0
- package/rules/.source/quicktvui/src/poster/qt-poster-corner-title.vue +69 -0
- package/rules/.source/quicktvui/src/poster/qt-poster-focus-title.vue +113 -0
- package/rules/.source/quicktvui/src/progressbar/QTIProgressBar.ts +264 -0
- package/rules/.source/quicktvui/src/progressbar/QTProgressBar.ts +1284 -0
- package/rules/.source/quicktvui/src/progressbar/QtProgressBarAPI.ts +2637 -0
- package/rules/.source/quicktvui/src/qrcode/QTIQRCode.ts +3 -0
- package/rules/.source/quicktvui/src/qrcode/QTQRCodeView.ts +24 -0
- package/rules/.source/quicktvui/src/qrcode/QtQRCodeAPI.ts +9 -0
- package/rules/.source/quicktvui/src/qt/QtAPI.ts +337 -0
- package/rules/.source/quicktvui/src/qt/QtAPIModule.ts +3 -0
- package/rules/.source/quicktvui/src/qt/warning.ts +9 -0
- package/rules/.source/quicktvui/src/qtListen/README.md +76 -0
- package/rules/.source/quicktvui/src/qtListen/effect.ts +141 -0
- package/rules/.source/quicktvui/src/qtListen/index.ts +11 -0
- package/rules/.source/quicktvui/src/qtListen/qtArray.ts +156 -0
- package/rules/.source/quicktvui/src/qtListen/qtDiff.ts +143 -0
- package/rules/.source/quicktvui/src/qtListen/reactive.ts +205 -0
- package/rules/.source/quicktvui/src/qtListen/ref.ts +98 -0
- package/rules/.source/quicktvui/src/qtListen/types.ts +311 -0
- package/rules/.source/quicktvui/src/qtListen/watch.ts +233 -0
- package/rules/.source/quicktvui/src/replace-child/QTIReplaceChildView.ts +5 -0
- package/rules/.source/quicktvui/src/replace-child/QTReplaceChildView.ts +30 -0
- package/rules/.source/quicktvui/src/replace-child/QtReplaceChildViewAPI.ts +37 -0
- package/rules/.source/quicktvui/src/row/QTIRow.ts +3 -0
- package/rules/.source/quicktvui/src/row/QtRowAPI.ts +9 -0
- package/rules/.source/quicktvui/src/row/index.vue +29 -0
- package/rules/.source/quicktvui/src/scroll-view/QTIScrollView.ts +7 -0
- package/rules/.source/quicktvui/src/scroll-view/QTScrollView.ts +45 -0
- package/rules/.source/quicktvui/src/scroll-view/QtScrollViewAPI.ts +62 -0
- package/rules/.source/quicktvui/src/section/index.vue +40 -0
- package/rules/.source/quicktvui/src/seekbar/QTISeekBar.ts +277 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBar.ts +1380 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarGravity.ts +5 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarIndicatorMode.ts +6 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarMode.ts +4 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkGravity.ts +5 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkLayoutGravity.ts +4 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkMode.ts +4 -0
- package/rules/.source/quicktvui/src/seekbar/QtSeekBarAPI.ts +2645 -0
- package/rules/.source/quicktvui/src/series/DataAdapter.ts +329 -0
- package/rules/.source/quicktvui/src/series/QTIMediaSeries.ts +33 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeries.ts +9 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesData.ts +9 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesDataStyle.ts +4 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesEvent.ts +7 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesGroup.ts +8 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesGroupStyle.ts +58 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesStyleType.ts +5 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesType.ts +8 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesVip.ts +4 -0
- package/rules/.source/quicktvui/src/series/QtMediaSeriesAPI.ts +140 -0
- package/rules/.source/quicktvui/src/series/component/media-series.vue +160 -0
- package/rules/.source/quicktvui/src/series/index.vue +316 -0
- package/rules/.source/quicktvui/src/series/item/media-series-number-item.vue +212 -0
- package/rules/.source/quicktvui/src/series/item/media-series-text-item.vue +239 -0
- package/rules/.source/quicktvui/src/tab/QTITab.ts +163 -0
- package/rules/.source/quicktvui/src/tab/QTTab.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QTTabDataManager.ts +620 -0
- package/rules/.source/quicktvui/src/tab/QTTabEvent.ts +11 -0
- package/rules/.source/quicktvui/src/tab/QTTabEventParams.ts +12 -0
- package/rules/.source/quicktvui/src/tab/QTTabIndex.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QTTabItem.ts +5 -0
- package/rules/.source/quicktvui/src/tab/QTTabItemType.ts +3 -0
- package/rules/.source/quicktvui/src/tab/QTTabPage.ts +5 -0
- package/rules/.source/quicktvui/src/tab/QTTabPageData.ts +11 -0
- package/rules/.source/quicktvui/src/tab/QTTabPageDataState.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QTTabPageState.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QtTabAPI.ts +578 -0
- package/rules/.source/quicktvui/src/tab/index.vue +1561 -0
- package/rules/.source/quicktvui/src/tab/useQtTabWatch.ts +203 -0
- package/rules/.source/quicktvui/src/text/QTIText.ts +12 -0
- package/rules/.source/quicktvui/src/text/QTTextSpan.ts +6 -0
- package/rules/.source/quicktvui/src/text/QTTextSpanAttribute.ts +6 -0
- package/rules/.source/quicktvui/src/text/QTTextSpanAttributeType.ts +4 -0
- package/rules/.source/quicktvui/src/text/QtTextAPI.ts +90 -0
- package/rules/.source/quicktvui/src/text/index.vue +44 -0
- package/rules/.source/quicktvui/src/theme/button.css +195 -0
- package/rules/.source/quicktvui/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/quicktvui/src/ul/QTIUL.ts +34 -0
- package/rules/.source/quicktvui/src/ul/QTULInitPosition.ts +3 -0
- package/rules/.source/quicktvui/src/ul/QtULAPI.ts +232 -0
- package/rules/.source/quicktvui/src/utils/QtVirtualViewAPI.ts +32 -0
- package/rules/.source/quicktvui/src/utils/VirtualView.ts +124 -0
- package/rules/.source/quicktvui/src/utils/functions.ts +1 -0
- package/rules/.source/quicktvui/src/utils/index.ts +3 -0
- package/rules/.source/quicktvui/src/utils/make-installer.ts +16 -0
- package/rules/.source/quicktvui/src/utils/objects.ts +4 -0
- package/rules/.source/quicktvui/src/utils/type.ts +1 -0
- package/rules/.source/quicktvui/src/utils/types.ts +42 -0
- package/rules/.source/quicktvui/src/utils/utils.ts +62 -0
- package/rules/.source/quicktvui/src/utils/vue/index.ts +3 -0
- package/rules/.source/quicktvui/src/utils/vue/install.ts +48 -0
- package/rules/.source/quicktvui/src/utils/vue/props/index.ts +3 -0
- package/rules/.source/quicktvui/src/utils/vue/props/runtime.ts +129 -0
- package/rules/.source/quicktvui/src/utils/vue/props/types.ts +165 -0
- package/rules/.source/quicktvui/src/utils/vue/props/util.ts +10 -0
- package/rules/.source/quicktvui/src/utils/vue/typescript.ts +9 -0
- package/rules/.source/quicktvui/src/view/QTIView.ts +3 -0
- package/rules/.source/quicktvui/src/view/QTIViewVisibility.ts +5 -0
- package/rules/.source/quicktvui/src/view/QTViewEvent.ts +3 -0
- package/rules/.source/quicktvui/src/view/QTViewState.ts +12 -0
- package/rules/.source/quicktvui/src/view/QtViewAPI.ts +9 -0
- package/rules/.source/quicktvui/src/view/index.vue +24 -0
- package/rules/.source/quicktvui/src/waterfall/QtWaterfallAPI.ts +219 -0
- package/rules/.source/quicktvui/src/waterfall/README.md +143 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTIWaterfall.ts +49 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTScrollState.ts +5 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfall.ts +13 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardItem.ts +11 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardPlaceHolder.ts +10 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardSection.ts +12 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallDataAdapter.ts +195 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallDataManager.ts +305 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallEvent.ts +11 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallFlexStyle.ts +19 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallIndex.ts +7 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallItem.ts +9 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallItemType.ts +7 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPlaceholder.ts +5 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPluginItem.ts +9 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPluginSection.ts +8 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallSection.ts +17 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallSectionType.ts +14 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallTabItem.ts +10 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallVisibleType.ts +7 -0
- package/rules/.source/quicktvui/src/waterfall/index.vue +704 -0
- package/rules/.source/quicktvui/src/waterfall/item/card-item.vue +49 -0
- package/rules/.source/quicktvui/src/waterfall/item/plugin-item.vue +52 -0
- package/rules/.source/quicktvui/src/waterfall/section/blank-section.vue +27 -0
- package/rules/.source/quicktvui/src/waterfall/section/card-section.vue +81 -0
- package/rules/.source/quicktvui/src/waterfall/section/end-section.vue +50 -0
- package/rules/.source/quicktvui/src/waterfall/section/flex-section.vue +167 -0
- package/rules/.source/quicktvui/src/waterfall/section/list-section.vue +247 -0
- package/rules/.source/quicktvui/src/waterfall/section/loading-section.vue +34 -0
- package/rules/.source/quicktvui/src/waterfall/section/plugin-section.vue +87 -0
- package/rules/.source/quicktvui/src/waterfall/section/section-title.vue +63 -0
- package/rules/.source/quicktvui/src/waterfall/section/vue-section.vue +44 -0
- package/rules/.source/quicktvui/src/webview/QTIWebView.ts +199 -0
- package/rules/.source/quicktvui/src/webview/QTWebView.ts +957 -0
- package/rules/.source/quicktvui/src/webview/QTWebViewInterceptRule.ts +4 -0
- package/rules/.source/quicktvui/src/webview/QTWebViewLayerType.ts +6 -0
- package/rules/.source/quicktvui/src/webview/QTWebViewSniffingRule.ts +18 -0
- package/rules/.source/quicktvui/src/webview/QtWebViewAPI.ts +1963 -0
- package/rules/.source/quicktvui/src/x5webview/QTIX5WebView.ts +211 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebView.ts +1014 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebViewInterceptRule.ts +4 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebViewLayerType.ts +6 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebViewSniffingRule.ts +18 -0
- package/rules/.source/quicktvui/src/x5webview/QtX5WebViewAPI.ts +2015 -0
- package/rules/.source/quicktvui/tsconfig.json +34 -0
- package/rules/.source/quicktvui/web-types.json +1 -0
- package/rules/.source/quicktvui/yarn.lock +72 -0
- package/rules/.source/web/audio/index.ts +9 -0
- package/rules/.source/web/audio/src/audio.ts +34 -0
- package/rules/.source/web/audio/src/audio.vue +146 -0
- package/rules/.source/web/audio/src/instance.ts +3 -0
- package/rules/.source/web/audio-service/index.ts +10 -0
- package/rules/.source/web/audio-service/src/audio-service.ts +34 -0
- package/rules/.source/web/audio-service/src/audio-service.vue +115 -0
- package/rules/.source/web/audio-service/src/instance.ts +3 -0
- package/rules/.source/web/base/index.ts +1 -0
- package/rules/.source/web/base/src/base-types.ts +1 -0
- package/rules/.source/web/component.ts +25 -0
- package/rules/.source/web/docs/h.txt +6 -0
- package/rules/.source/web/docs/video.txt +88 -0
- package/rules/.source/web/h1/index.ts +9 -0
- package/rules/.source/web/h1/src/h1.ts +9 -0
- package/rules/.source/web/h1/src/h1.vue +30 -0
- package/rules/.source/web/h1/src/instance.ts +3 -0
- package/rules/.source/web/h2/index.ts +9 -0
- package/rules/.source/web/h2/src/h2.ts +9 -0
- package/rules/.source/web/h2/src/h2.vue +30 -0
- package/rules/.source/web/h2/src/instance.ts +3 -0
- package/rules/.source/web/h3/index.ts +9 -0
- package/rules/.source/web/h3/src/h3.ts +9 -0
- package/rules/.source/web/h3/src/h3.vue +30 -0
- package/rules/.source/web/h3/src/instance.ts +3 -0
- package/rules/.source/web/h4/index.ts +9 -0
- package/rules/.source/web/h4/src/h4.ts +9 -0
- package/rules/.source/web/h4/src/h4.vue +30 -0
- package/rules/.source/web/h4/src/instance.ts +3 -0
- package/rules/.source/web/h5/index.ts +9 -0
- package/rules/.source/web/h5/src/h5.ts +9 -0
- package/rules/.source/web/h5/src/h5.vue +30 -0
- package/rules/.source/web/h5/src/instance.ts +3 -0
- package/rules/.source/web/h6/index.ts +9 -0
- package/rules/.source/web/h6/src/h6.ts +9 -0
- package/rules/.source/web/h6/src/h6.vue +30 -0
- package/rules/.source/web/h6/src/instance.ts +3 -0
- package/rules/.source/web/index.ts +84 -0
- package/rules/.source/web/package.json +24 -0
- package/rules/.source/web/plugin.ts +3 -0
- package/rules/.source/web/rollup.config.js +37 -0
- package/rules/.source/web/shims-vue.d.ts +6 -0
- package/rules/.source/web/source/index.ts +9 -0
- package/rules/.source/web/source/src/instance.ts +3 -0
- package/rules/.source/web/source/src/source.ts +17 -0
- package/rules/.source/web/source/src/source.vue +19 -0
- package/rules/.source/web/tsconfig.json +34 -0
- package/rules/.source/web/utils/functions.ts +1 -0
- package/rules/.source/web/utils/index.ts +3 -0
- package/rules/.source/web/utils/make-installer.ts +16 -0
- package/rules/.source/web/utils/objects.ts +4 -0
- package/rules/.source/web/utils/types.ts +42 -0
- package/rules/.source/web/utils/vue/index.ts +3 -0
- package/rules/.source/web/utils/vue/install.ts +48 -0
- package/rules/.source/web/utils/vue/props/index.ts +3 -0
- package/rules/.source/web/utils/vue/props/runtime.ts +129 -0
- package/rules/.source/web/utils/vue/props/types.ts +165 -0
- package/rules/.source/web/utils/vue/props/util.ts +10 -0
- package/rules/.source/web/utils/vue/typescript.ts +9 -0
- package/rules/.source/web/video/index.ts +9 -0
- package/rules/.source/web/video/src/instance.ts +3 -0
- package/rules/.source/web/video/src/video.ts +34 -0
- package/rules/.source/web/video/src/video.vue +171 -0
- package/rules/.windsurfrules +28 -4
- package/rules/AGENTS.md +28 -4
- package/rules/CLAUDE.md +28 -3
- package/rules/GEMINI.md +26 -3
|
@@ -0,0 +1,2189 @@
|
|
|
1
|
+
/* Tencent is pleased to support the open source community by making Hippy available.
|
|
2
|
+
* Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package com.tencent.mtt.hippy.uimanager;
|
|
17
|
+
|
|
18
|
+
import android.content.Context;
|
|
19
|
+
import android.graphics.Color;
|
|
20
|
+
import android.graphics.Rect;
|
|
21
|
+
import android.os.Build;
|
|
22
|
+
import android.os.Looper;
|
|
23
|
+
import android.os.MessageQueue;
|
|
24
|
+
import android.support.annotation.Nullable;
|
|
25
|
+
import android.text.TextUtils;
|
|
26
|
+
import android.util.Log;
|
|
27
|
+
import android.view.View;
|
|
28
|
+
import android.view.ViewGroup;
|
|
29
|
+
import android.view.ViewParent;
|
|
30
|
+
import android.widget.ProgressBar;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
import com.tencent.extend.AutoFocusManager;
|
|
34
|
+
import com.tencent.extend.FocusManagerModule;
|
|
35
|
+
import com.tencent.extend.FocusUtils;
|
|
36
|
+
import com.tencent.extend.ITVView;
|
|
37
|
+
import com.tencent.extend.RenderUtil;
|
|
38
|
+
import com.tencent.extend.TVBaseView;
|
|
39
|
+
import com.tencent.extend.TVFocusScaleExcuter;
|
|
40
|
+
import com.tencent.extend.TriggerTaskHost;
|
|
41
|
+
import com.tencent.extend.TriggerTaskManagerModule;
|
|
42
|
+
import com.tencent.extend.views.ExtendTag;
|
|
43
|
+
import com.tencent.extend.views.TVTextView;
|
|
44
|
+
import com.tencent.extend.views.fastlist.FastAdapter;
|
|
45
|
+
import com.tencent.extend.views.fastlist.FastItemView;
|
|
46
|
+
import com.tencent.extend.views.fastlist.FastListView;
|
|
47
|
+
import com.tencent.extend.views.fastlist.FastListViewController;
|
|
48
|
+
import com.tencent.extend.views.fastlist.ReplaceChildView;
|
|
49
|
+
import com.tencent.extend.views.fastlist.TemplateCodeParser;
|
|
50
|
+
import com.tencent.extend.views.fastlist.Utils;
|
|
51
|
+
import com.tencent.mtt.hippy.FocusDispatchView;
|
|
52
|
+
import com.tencent.mtt.hippy.HippyEngineContext;
|
|
53
|
+
import com.tencent.mtt.hippy.HippyInstanceContext;
|
|
54
|
+
import com.tencent.mtt.hippy.HippyRootView;
|
|
55
|
+
import com.tencent.mtt.hippy.R;
|
|
56
|
+
import com.tencent.mtt.hippy.TVFocusHelper;
|
|
57
|
+
import com.tencent.mtt.hippy.annotation.HippyControllerProps;
|
|
58
|
+
import com.tencent.mtt.hippy.common.HippyArray;
|
|
59
|
+
import com.tencent.mtt.hippy.common.HippyMap;
|
|
60
|
+
import com.tencent.mtt.hippy.common.HippyTag;
|
|
61
|
+
import com.tencent.mtt.hippy.dom.node.NodeProps;
|
|
62
|
+
import com.tencent.mtt.hippy.dom.node.StyleNode;
|
|
63
|
+
import com.tencent.mtt.hippy.modules.Promise;
|
|
64
|
+
import com.tencent.mtt.hippy.utils.ExtendUtil;
|
|
65
|
+
import com.tencent.mtt.hippy.utils.LogAdapterUtils;
|
|
66
|
+
import com.tencent.mtt.hippy.utils.LogUtils;
|
|
67
|
+
import com.tencent.mtt.hippy.utils.PixelUtil;
|
|
68
|
+
import com.tencent.mtt.hippy.views.common.CommonBorder;
|
|
69
|
+
import com.tencent.mtt.hippy.views.image.HippyImageView;
|
|
70
|
+
import com.tencent.mtt.hippy.views.list.HippyListView;
|
|
71
|
+
import com.tencent.mtt.hippy.views.list.HippyRecycler;
|
|
72
|
+
import com.tencent.mtt.hippy.views.list.TVSingleLineListView;
|
|
73
|
+
import com.tencent.mtt.hippy.views.text.HippyTextView;
|
|
74
|
+
import com.tencent.mtt.hippy.views.view.HippyViewGroup;
|
|
75
|
+
import com.tencent.mtt.hippy.views.view.HippyViewGroupController;
|
|
76
|
+
import com.tencent.mtt.supportui.views.IGradient;
|
|
77
|
+
import com.tencent.mtt.supportui.views.IShadow;
|
|
78
|
+
import com.tencent.mtt.supportui.views.asyncimage.AsyncImageView;
|
|
79
|
+
|
|
80
|
+
import java.io.File;
|
|
81
|
+
import java.util.ArrayList;
|
|
82
|
+
import java.util.HashMap;
|
|
83
|
+
import java.util.List;
|
|
84
|
+
import java.util.Map;
|
|
85
|
+
|
|
86
|
+
@SuppressWarnings({"deprecation", "unused"})
|
|
87
|
+
public abstract class HippyViewController<T extends View & HippyViewBase> implements
|
|
88
|
+
View.OnFocusChangeListener {
|
|
89
|
+
|
|
90
|
+
private static final String TAG = "HippyViewController";
|
|
91
|
+
|
|
92
|
+
private CacheMap cacheViewsPool;
|
|
93
|
+
|
|
94
|
+
private static final MatrixUtil.MatrixDecompositionContext sMatrixDecompositionContext = new MatrixUtil.MatrixDecompositionContext();
|
|
95
|
+
private static final double[] sTransformDecompositionArray = new double[16];
|
|
96
|
+
private boolean bUserChageFocus = false;
|
|
97
|
+
HippyViewEvent mFocusEvent;
|
|
98
|
+
HippyViewEvent mSelectEvent;
|
|
99
|
+
|
|
100
|
+
public void setCacheViewsPool(CacheMap cacheViews) {
|
|
101
|
+
this.cacheViewsPool = cacheViews;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@SuppressWarnings("deprecation")
|
|
105
|
+
public View createView(HippyRootView rootView, int id, HippyEngineContext hippyEngineContext,
|
|
106
|
+
String className,
|
|
107
|
+
HippyMap initialProps) {
|
|
108
|
+
View view = null;
|
|
109
|
+
|
|
110
|
+
if (rootView != null) {
|
|
111
|
+
Context rootViewContext = rootView.getContext();
|
|
112
|
+
if (rootViewContext instanceof HippyInstanceContext) {
|
|
113
|
+
@SuppressWarnings("rawtypes") Map nativeParam = ((HippyInstanceContext) rootViewContext)
|
|
114
|
+
.getNativeParams();
|
|
115
|
+
if (nativeParam != null) {
|
|
116
|
+
Object object = nativeParam.get(HippyCustomViewCreator.HIPPY_CUSTOM_VIEW_CREATOR);
|
|
117
|
+
if (object instanceof HippyCustomViewCreator) {
|
|
118
|
+
view = ((HippyCustomViewCreator) object)
|
|
119
|
+
.createCustomView(className, rootView.getContext(), initialProps);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
final String cache = initialProps.getString("cacheType");
|
|
125
|
+
if (view == null && cacheViewsPool != null) {
|
|
126
|
+
view = cacheViewsPool.get(cache);
|
|
127
|
+
if (view instanceof HippyRecycler) {
|
|
128
|
+
((HippyRecycler) view).resetProps();
|
|
129
|
+
}
|
|
130
|
+
if (view != null) {
|
|
131
|
+
onCreateViewByCache(view, cache, initialProps);
|
|
132
|
+
}
|
|
133
|
+
if (LogUtils.isDebug()) {
|
|
134
|
+
Log.d(TAG, "createView from cacheViews :" + view + ",type:" + initialProps.getString("cacheType"));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (view == null) {
|
|
138
|
+
view = createViewImpl(rootView.getContext(), initialProps);
|
|
139
|
+
if (view == null) {
|
|
140
|
+
view = createViewImpl(rootView.getContext());
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
//zhaopeng add
|
|
145
|
+
onAfterCreateView(view, initialProps, className);
|
|
146
|
+
|
|
147
|
+
LogUtils.d(TAG, "createView id " + id);
|
|
148
|
+
view.setId(id);
|
|
149
|
+
//view.setTag(className);
|
|
150
|
+
HippyMap tagObj = HippyTag.createTagMap(className, initialProps, cache);
|
|
151
|
+
view.setTag(tagObj);
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
return view;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
protected void onCreateViewByCache(View view, String type, HippyMap props) {
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
protected void onAfterCreateView(View view, HippyMap initialProps) {
|
|
162
|
+
//zhaopeng add 添加tag
|
|
163
|
+
ExtendTag.putTag(view, new ExtendTag());
|
|
164
|
+
CustomControllerHelper.dealCustomProp(view, initialProps);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
protected void onAfterCreateView(View view, HippyMap initialProps, String className) {
|
|
168
|
+
//zhaopeng add 添加tag
|
|
169
|
+
onAfterCreateView(view, initialProps);
|
|
170
|
+
ExtendTag.obtainExtendTag(view).nodeClassName = className;
|
|
171
|
+
|
|
172
|
+
if (view.getContext() instanceof HippyInstanceContext) {
|
|
173
|
+
HippyEngineContext engineContext = ((HippyInstanceContext) view.getContext()).getEngineContext();
|
|
174
|
+
FocusManagerModule.GlobalFocusConfig config = FocusManagerModule.getGlobalFocusConfig(engineContext);
|
|
175
|
+
if (config.forceDisableFocus) {
|
|
176
|
+
view.setFocusable(false);
|
|
177
|
+
view.setFocusableInTouchMode(false);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
public void onAfterUpdateProps(T v) {
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
// public void updateProps(View view, HippyMap props)
|
|
189
|
+
// {
|
|
190
|
+
// if (props == null)
|
|
191
|
+
// return;
|
|
192
|
+
// try
|
|
193
|
+
// {
|
|
194
|
+
// HippyMap styleProps = props.get(NodeProps.STYLE) != null ? (HippyMap) props.get(NodeProps.STYLE) : null;
|
|
195
|
+
// Method[] targetMethods = getClass().getMethods();
|
|
196
|
+
//
|
|
197
|
+
// for (Method targetMethod : targetMethods)
|
|
198
|
+
// {
|
|
199
|
+
// HippyControllerProps hippyProps = targetMethod.getAnnotation(HippyC ontrollerProps.class);
|
|
200
|
+
// if (hippyProps != null)
|
|
201
|
+
// {
|
|
202
|
+
// String propsName = hippyProps.name();
|
|
203
|
+
// if (props.get(propsName) != null) // try normal props first
|
|
204
|
+
// {
|
|
205
|
+
// targetMethod.invoke(this, view, props.get(propsName));
|
|
206
|
+
// }
|
|
207
|
+
// else if (styleProps != null && styleProps.get(propsName) != null) // then try styleprops
|
|
208
|
+
// {
|
|
209
|
+
// targetMethod.invoke(this, view, styleProps.get(propsName));
|
|
210
|
+
// }
|
|
211
|
+
// }
|
|
212
|
+
// }
|
|
213
|
+
// }
|
|
214
|
+
// catch (IllegalAccessException e)
|
|
215
|
+
// {
|
|
216
|
+
// e.printStackTrace();
|
|
217
|
+
// }
|
|
218
|
+
// catch (InvocationTargetException e)
|
|
219
|
+
// {
|
|
220
|
+
// e.printStackTrace();
|
|
221
|
+
// }
|
|
222
|
+
// catch (IllegalArgumentException e)
|
|
223
|
+
// {
|
|
224
|
+
// e.printStackTrace();
|
|
225
|
+
// }
|
|
226
|
+
// }
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
protected void updateExtra(View view, Object object) {
|
|
230
|
+
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@SuppressWarnings("SameReturnValue")
|
|
234
|
+
protected StyleNode createNode(boolean isVirtual, int rootId) {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
protected StyleNode createNode(boolean isVirtual) {
|
|
239
|
+
return new StyleNode();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
public void updateLayout(int id, int x, int y, int width, int height,
|
|
243
|
+
ControllerRegistry componentHolder) {
|
|
244
|
+
View view = componentHolder.getView(id);
|
|
245
|
+
if (view != null) {
|
|
246
|
+
view.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
|
|
247
|
+
View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
|
|
248
|
+
if (!shouldInterceptLayout(view, x, y, width, height)) {
|
|
249
|
+
view.layout(x, y, x + width, y + height);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
protected boolean shouldInterceptLayout(View view, int x, int y, int width, int height) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
|
259
|
+
protected boolean handleGestureBySelf() {
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@Deprecated
|
|
264
|
+
protected abstract View createViewImpl(Context context);
|
|
265
|
+
|
|
266
|
+
protected View createViewImpl(Context context, HippyMap iniProps) {
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* transform
|
|
273
|
+
**/
|
|
274
|
+
@HippyControllerProps(name = NodeProps.TRANSFORM, defaultType = HippyControllerProps.ARRAY)
|
|
275
|
+
public void setTransform(T view, HippyArray transformArray) {
|
|
276
|
+
if (transformArray == null) {
|
|
277
|
+
resetTransform(view);
|
|
278
|
+
} else {
|
|
279
|
+
applyTransform(view, transformArray);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* transform
|
|
285
|
+
**/
|
|
286
|
+
@HippyControllerProps(name = "layout", defaultType = HippyControllerProps.ARRAY)
|
|
287
|
+
public void setLayoutInfo(T view, HippyArray layout) {
|
|
288
|
+
if (layout.size() == 4) {
|
|
289
|
+
CustomControllerHelper.updateLayout(view, Utils.toPX(layout.getInt(0)), Utils.toPX(layout.getInt(1)), Utils.toPX(layout.getInt(2)), Utils.toPX(layout.getInt(3)));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
@HippyControllerProps(name = NodeProps.PROP_ACCESSIBILITY_LABEL)
|
|
295
|
+
public void setAccessibilityLabel(T view, String accessibilityLabel) {
|
|
296
|
+
if (accessibilityLabel == null) {
|
|
297
|
+
accessibilityLabel = "";
|
|
298
|
+
}
|
|
299
|
+
view.setContentDescription(accessibilityLabel);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* zIndex
|
|
304
|
+
**/
|
|
305
|
+
@HippyControllerProps(name = NodeProps.Z_INDEX, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
306
|
+
public void setZIndex(T view, int zIndex) {
|
|
307
|
+
HippyViewGroupController.setViewZIndex(view, zIndex);
|
|
308
|
+
ViewParent parent = view.getParent();
|
|
309
|
+
if (parent instanceof IHippyZIndexViewGroup) {
|
|
310
|
+
((IHippyZIndexViewGroup) parent).updateDrawingOrder();
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* color/border/alpha
|
|
316
|
+
**/
|
|
317
|
+
@HippyControllerProps(name = NodeProps.BACKGROUND_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
318
|
+
public void setBackground(T view, int backgroundColor) {
|
|
319
|
+
view.setBackgroundColor(backgroundColor);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* color/border/alpha
|
|
324
|
+
**/
|
|
325
|
+
@HippyControllerProps(name = "backgroundColorStr", defaultType = HippyControllerProps.STRING)
|
|
326
|
+
public void setBackgroundString(T view, String backgroundColor) {
|
|
327
|
+
try {
|
|
328
|
+
view.setBackgroundColor(Color.parseColor(backgroundColor));
|
|
329
|
+
ExtendTag.obtainExtendTag(view).pendingBackGroundColor = Color.parseColor(backgroundColor);
|
|
330
|
+
} catch (Exception e) {
|
|
331
|
+
e.printStackTrace();
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@HippyControllerProps(name = NodeProps.OPACITY, defaultType = HippyControllerProps.NUMBER, defaultNumber = 1.f)
|
|
336
|
+
public void setOpacity(T view, float opacity) {
|
|
337
|
+
view.setAlpha(opacity);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
@HippyControllerProps(name = NodeProps.BORDER_RADIUS, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
341
|
+
public void setBorderRadius(T view, float borderRadius) {
|
|
342
|
+
if (view instanceof CommonBorder) {
|
|
343
|
+
((CommonBorder) view)
|
|
344
|
+
.setBorderRadius(borderRadius, CommonBorder.BorderRadiusDirection.ALL.ordinal());
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
@HippyControllerProps(name = NodeProps.BORDER_TOP_LEFT_RADIUS, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
350
|
+
public void setTopLeftBorderRadius(T view, float topLeftBorderRadius) {
|
|
351
|
+
if (view instanceof CommonBorder) {
|
|
352
|
+
((CommonBorder) view).setBorderRadius(topLeftBorderRadius,
|
|
353
|
+
CommonBorder.BorderRadiusDirection.TOP_LEFT.ordinal());
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
@HippyControllerProps(name = NodeProps.BORDER_TOP_RIGHT_RADIUS, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
359
|
+
public void setTopRightBorderRadius(T view, float topRightBorderRadius) {
|
|
360
|
+
if (view instanceof CommonBorder) {
|
|
361
|
+
((CommonBorder) view).setBorderRadius(topRightBorderRadius,
|
|
362
|
+
CommonBorder.BorderRadiusDirection.TOP_RIGHT.ordinal());
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
@HippyControllerProps(name = NodeProps.BORDER_BOTTOM_RIGHT_RADIUS, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
368
|
+
public void setBottomRightBorderRadius(T view, float bottomRightBorderRadius) {
|
|
369
|
+
if (view instanceof CommonBorder) {
|
|
370
|
+
((CommonBorder) view).setBorderRadius(bottomRightBorderRadius,
|
|
371
|
+
CommonBorder.BorderRadiusDirection.BOTTOM_RIGHT.ordinal());
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
@HippyControllerProps(name = NodeProps.BORDER_BOTTOM_LEFT_RADIUS, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
377
|
+
public void setBottomLeftBorderRadius(T view, float bottomLeftBorderRadius) {
|
|
378
|
+
if (view instanceof CommonBorder) {
|
|
379
|
+
((CommonBorder) view).setBorderRadius(bottomLeftBorderRadius,
|
|
380
|
+
CommonBorder.BorderRadiusDirection.BOTTOM_LEFT.ordinal());
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
@HippyControllerProps(name = NodeProps.BORDER_WIDTH, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
386
|
+
public void setBorderWidth(T view, float borderWidth) {
|
|
387
|
+
if (view instanceof CommonBorder) {
|
|
388
|
+
((CommonBorder) view)
|
|
389
|
+
.setBorderWidth(borderWidth, CommonBorder.BorderWidthDirection.ALL.ordinal());
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_DOWN_ID, defaultType = HippyControllerProps.BOOLEAN)
|
|
394
|
+
public void setNextFocusDownId(T view, int id) {
|
|
395
|
+
view.setNextFocusDownId(id);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_UP_ID, defaultType = HippyControllerProps.BOOLEAN)
|
|
399
|
+
public void setNextFocusUpId(T view, int id) {
|
|
400
|
+
view.setNextFocusUpId(id);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_LEFT_ID, defaultType = HippyControllerProps.BOOLEAN)
|
|
404
|
+
public void setNextFocusLeftId(T view, int id) {
|
|
405
|
+
view.setNextFocusLeftId(id);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_RIGHT_ID, defaultType = HippyControllerProps.BOOLEAN)
|
|
409
|
+
public void setNextFocusRightId(T view, int id) {
|
|
410
|
+
view.setNextFocusRightId(id);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
//2.7 add 指定 nextFocus By sid
|
|
414
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_DOWN_SID, defaultType = HippyControllerProps.STRING)
|
|
415
|
+
public void setNextFocusDownSId(T view, String id) {
|
|
416
|
+
FocusUtils.setNextFocusDownSID(view, id);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_UP_SID, defaultType = HippyControllerProps.STRING)
|
|
420
|
+
public void setNextFocusUpSId(T view, String id) {
|
|
421
|
+
FocusUtils.setNextFocusUpSID(view, id);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_LEFT_SID, defaultType = HippyControllerProps.STRING)
|
|
425
|
+
public void setNextFocusLeftSId(T view, String id) {
|
|
426
|
+
FocusUtils.setNextFocusLeftSID(view, id);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_RIGHT_SID, defaultType = HippyControllerProps.STRING)
|
|
430
|
+
public void setNextFocusRightSId(T view, String id) {
|
|
431
|
+
FocusUtils.setNextFocusRightSID(view, id);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_SID, defaultType = HippyControllerProps.MAP)
|
|
435
|
+
public void setNextFocusSId(T view, HippyMap hippyMap) {
|
|
436
|
+
if (hippyMap != null) {
|
|
437
|
+
final String nextLeft = hippyMap.getString(TVFocusHelper.KEY_NEXT_FOCUS_LEFT_FRONT);
|
|
438
|
+
final String nextRight = hippyMap.getString(TVFocusHelper.KEY_NEXT_FOCUS_RIGHT_FRONT);
|
|
439
|
+
final String nextUP = hippyMap.getString(TVFocusHelper.KEY_NEXT_FOCUS_UP_FRONT);
|
|
440
|
+
final String nextDown = hippyMap.getString(TVFocusHelper.KEY_NEXT_FOCUS_DOWN_FRONT);
|
|
441
|
+
setNextFocusLeftSId(view, nextLeft);
|
|
442
|
+
setNextFocusRightSId(view, nextRight);
|
|
443
|
+
setNextFocusUpSId(view, nextUP);
|
|
444
|
+
setNextFocusDownSId(view, nextDown);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
//nextFocus By sid
|
|
449
|
+
|
|
450
|
+
@Deprecated
|
|
451
|
+
@HippyControllerProps(name = "idTag", defaultType = HippyControllerProps.STRING)
|
|
452
|
+
public void setTagID(T view, String tagID) {
|
|
453
|
+
view.setTag(R.id.tag_item_id, tagID);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@HippyControllerProps(name = "sid", defaultType = HippyControllerProps.STRING)
|
|
457
|
+
public void setSID(T view, String sid) {
|
|
458
|
+
//给view设置string的id,整个view树里唯一
|
|
459
|
+
ExtendUtil.putViewSID(view, sid);
|
|
460
|
+
if (view instanceof TVBaseView) {
|
|
461
|
+
((TVBaseView) view).onSetSid(sid);
|
|
462
|
+
}
|
|
463
|
+
if (LogUtils.isDebug()) {
|
|
464
|
+
Log.d("configID4Item", "call by vue setSID :" + sid + ",view:" + ExtendUtil.debugViewLite(view));
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
//此处vue是怎么传值的
|
|
469
|
+
@HippyControllerProps(name = "scrollOverride", defaultType = HippyControllerProps.MAP)
|
|
470
|
+
public void setScrollOverride(T view, HippyMap hippyMap) {
|
|
471
|
+
if (view instanceof HippyViewGroup) {
|
|
472
|
+
((HippyViewGroup) view).setScrollOverride(hippyMap);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
@HippyControllerProps(name = "focusableInTouchMode", defaultType = HippyControllerProps.BOOLEAN)
|
|
477
|
+
public void setFocusableInTouchMode(T view, boolean focusable) {
|
|
478
|
+
view.setFocusableInTouchMode(focusable);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
@HippyControllerProps(name = NodeProps.FOCUSABLE, defaultType = HippyControllerProps.BOOLEAN)
|
|
482
|
+
public void setFocusable(T view, boolean focusable) {
|
|
483
|
+
// LogAdapterUtils.log(view.getContext(),FocusDispatchView.TAG,":setFocusable "+focusable+" view is :"+ExtendUtil.debugViewLite(view));
|
|
484
|
+
ExtendUtil.setViewFocusable(view, focusable);
|
|
485
|
+
if (view instanceof AsyncImageView) {
|
|
486
|
+
((AsyncImageView) view).setEnableMouse(focusable);
|
|
487
|
+
}
|
|
488
|
+
if ((view.getId() != -1)) {//2022.05.18 zhaopeng itemView不需要在这里设置事件
|
|
489
|
+
if (focusable) {
|
|
490
|
+
if (LogUtils.isDebug()) {
|
|
491
|
+
Log.i("ViewController", "ElementCallback setFocusable this view:" + view + ",id:" + view.getId());
|
|
492
|
+
}
|
|
493
|
+
view.setOnFocusChangeListener(this);
|
|
494
|
+
} else {
|
|
495
|
+
if (LogUtils.isDebug()) {
|
|
496
|
+
Log.i("ViewController", "ElementCallback setFocusable null view:" + view + ",id:" + view.getId());
|
|
497
|
+
}
|
|
498
|
+
view.setOnFocusChangeListener(null);
|
|
499
|
+
}
|
|
500
|
+
} else {
|
|
501
|
+
if (LogUtils.isDebug()) {
|
|
502
|
+
Log.e(TAG, "setup Focus fail,itemView 不需要设置FOCUSABLE");
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
@HippyControllerProps(name = NodeProps.REQUEST_FOCUS, defaultType = HippyControllerProps.BOOLEAN)
|
|
508
|
+
public void requestFocus(final T view, boolean request) {
|
|
509
|
+
if (LogUtils.isDebug() && request) {
|
|
510
|
+
Log.w(FocusDispatchView.TAG, "requestFocus called !!!! view:" + ExtendUtil.debugViewLite(view));
|
|
511
|
+
}
|
|
512
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":requestFocus " + request + " view is :" + ExtendUtil.debugViewLite(view));
|
|
513
|
+
if (request) {
|
|
514
|
+
//noinspection AccessStaticViaInstance
|
|
515
|
+
Looper.getMainLooper().myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
|
|
516
|
+
@Override
|
|
517
|
+
public boolean queueIdle() {
|
|
518
|
+
bUserChageFocus = true;
|
|
519
|
+
boolean result = view.requestFocusFromTouch();
|
|
520
|
+
|
|
521
|
+
if (!result) {
|
|
522
|
+
result = view.requestFocus();
|
|
523
|
+
LogUtils.d("requestFocus", "requestFocus result:" + result);
|
|
524
|
+
}
|
|
525
|
+
//Zhaopeng 20210421 解决9.0上有时候焦点请求慢的问题。
|
|
526
|
+
// view.requestFocus();
|
|
527
|
+
bUserChageFocus = false;
|
|
528
|
+
return false;
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/*2.5 add**/
|
|
536
|
+
@HippyControllerProps(name = "fadingEdgeLength", defaultType = HippyControllerProps.NUMBER)
|
|
537
|
+
public void setFadingEdgeLength(View view, int length) {
|
|
538
|
+
view.setFadingEdgeLength(Utils.toPX(length));
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@HippyControllerProps(name = "skipRequestFocus", defaultType = HippyControllerProps.BOOLEAN)
|
|
542
|
+
public void setSkipRequestFocus(View view, Boolean b) {
|
|
543
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":skipRequestFocus " + b + " view is :" + ExtendUtil.debugViewLite(view));
|
|
544
|
+
if (view instanceof ITVView) {
|
|
545
|
+
((ITVView) view).setSkipRequestFocus(b);
|
|
546
|
+
}
|
|
547
|
+
if (view instanceof ExtendViewGroup) {
|
|
548
|
+
((ExtendViewGroup) view).setSkipRequestFocus(b);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
@HippyControllerProps(name = "fillParent", defaultType = HippyControllerProps.BOOLEAN)
|
|
553
|
+
public void setFillParentEnabled(View view, Boolean fillParent) {
|
|
554
|
+
if (view instanceof ITVView) {
|
|
555
|
+
((ITVView) view).setFillParent(fillParent);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/*2.5 add**/
|
|
560
|
+
@HippyControllerProps(name = "horizontalFadingEdgeEnabled", defaultType = HippyControllerProps.BOOLEAN)
|
|
561
|
+
public void setHorizontalFadingEdgeEnabled(View view, boolean horizontalFadingEdgeEnabled) {
|
|
562
|
+
view.setHorizontalFadingEdgeEnabled(horizontalFadingEdgeEnabled);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/*2.5 add**/
|
|
566
|
+
@HippyControllerProps(name = "verticalFadingEdgeEnabled", defaultType = HippyControllerProps.BOOLEAN)
|
|
567
|
+
public void setVerticalFadingEdgeEnabled(View view, boolean verticalFadingEdgeEnabled) {
|
|
568
|
+
view.setVerticalFadingEdgeEnabled(verticalFadingEdgeEnabled);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@HippyControllerProps(name = "requestFocusFromTouchDirectly", defaultType = HippyControllerProps.BOOLEAN)
|
|
572
|
+
public void requestFocusFromTouch(final T view, final boolean request) {
|
|
573
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":requestFocusFromTouchDirectly request " + request + " view is :" + ExtendUtil.debugViewLite(view));
|
|
574
|
+
if (request) {
|
|
575
|
+
|
|
576
|
+
bUserChageFocus = true;
|
|
577
|
+
boolean result = view.requestFocusFromTouch();
|
|
578
|
+
|
|
579
|
+
if (!result) {
|
|
580
|
+
result = view.requestFocus();
|
|
581
|
+
LogUtils.d("requestFocus", "requestFocusFromTouch result:" + result);
|
|
582
|
+
}
|
|
583
|
+
if (LogUtils.isDebug()) {
|
|
584
|
+
LogUtils.e("requestFocus", "requestFocusFromTouch view:" + view.getId());
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
@HippyControllerProps(name = "requestFocusDirectly", defaultType = HippyControllerProps.BOOLEAN)
|
|
591
|
+
public void requestFocusDirectly(final T view, final boolean request) {
|
|
592
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":requestFocusDirectly request " + request + " view is :" + ExtendUtil.debugViewLite(view));
|
|
593
|
+
if (request) {
|
|
594
|
+
view.requestFocus();
|
|
595
|
+
if (LogUtils.isDebug()) {
|
|
596
|
+
LogUtils.e(FocusDispatchView.TAG, "requestFocusDirectly view:" + view.getId());
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
// @Deprecated
|
|
601
|
+
// //list controll属性
|
|
602
|
+
// @HippyControllerProps(name = "autoFocusID", defaultType = HippyControllerProps.STRING)
|
|
603
|
+
// public void setAutoFocus(final T view, final String autoFocusID) {
|
|
604
|
+
// final View rootView = HippyViewGroup.findPageRootView(view);
|
|
605
|
+
// if(rootView instanceof HippyViewGroup){
|
|
606
|
+
// ((HippyViewGroup) rootView).getAutoFocusManager().setAppearFocusTag(autoFocusID,0);
|
|
607
|
+
// }else{
|
|
608
|
+
// //final View rootView = HippyViewGroup.findPageRootView(view);
|
|
609
|
+
// Log.e(AutoFocusManager.TAG,"setAutoFocus called in controller error rootView is :"+rootView);
|
|
610
|
+
// }
|
|
611
|
+
// }
|
|
612
|
+
|
|
613
|
+
@Deprecated
|
|
614
|
+
@HippyControllerProps(name = "autoFocus", defaultType = HippyControllerProps.STRING)
|
|
615
|
+
public void setFocusSID(final T view, final String autoFocusID) {
|
|
616
|
+
LogUtils.i(AutoFocusManager.TAG, "set autoFocus by autoFocusID : " + autoFocusID + ",view:" + view);
|
|
617
|
+
final View rootView = HippyViewGroup.findPageRootView(view);
|
|
618
|
+
if (rootView instanceof HippyViewGroup) {
|
|
619
|
+
((HippyViewGroup) rootView).getAutoFocusManager().setGlobalAutofocusSID(autoFocusID, 0);
|
|
620
|
+
} else {
|
|
621
|
+
//final View rootView = HippyViewGroup.findPageRootView(view);
|
|
622
|
+
Log.w(AutoFocusManager.TAG, "setAutoFocus 1 called in controller error rootView is :" + rootView);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
@HippyControllerProps(name = "autofocusSID", defaultType = HippyControllerProps.STRING)
|
|
627
|
+
public void setAutoFocusSID(final T view, final String autoFocusID) {
|
|
628
|
+
if (TemplateCodeParser.isPendingProForce(autoFocusID)) {
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
final View rootView = HippyViewGroup.findPageRootView(view);
|
|
632
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":autofocusSID " + autoFocusID + " view is :" + ExtendUtil.debugViewLite(view));
|
|
633
|
+
if (rootView instanceof HippyViewGroup) {
|
|
634
|
+
((HippyViewGroup) rootView).getAutoFocusManager().setGlobalAutofocusSID(autoFocusID, 0);
|
|
635
|
+
} else {
|
|
636
|
+
//final View rootView = HippyViewGroup.findPageRootView(view);
|
|
637
|
+
Log.w(AutoFocusManager.TAG, "setAutofocusSID called in controller error rootView is :" + rootView);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
//list controll属性
|
|
643
|
+
@HippyControllerProps(name = "autofocus", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
|
|
644
|
+
public void setAutoFocus(final T view, final boolean autoFocus) {
|
|
645
|
+
LogUtils.i(AutoFocusManager.TAG, "set autoFocus by bool : " + autoFocus + ",view:" + view);
|
|
646
|
+
if (view instanceof ITVView) {
|
|
647
|
+
((ITVView) view).setAutoFocus(autoFocus, false);
|
|
648
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":setAutoFocus " + autoFocus + " view is :" + ExtendUtil.debugViewLite(view));
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
//list controll属性
|
|
653
|
+
@HippyControllerProps(name = "autofocusForce", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
|
|
654
|
+
public void setAutoFocusForce(final T view, final boolean autoFocus) {
|
|
655
|
+
LogUtils.i(AutoFocusManager.TAG, "set autoFocus by bool : " + autoFocus + ",view:" + view);
|
|
656
|
+
if (view instanceof ITVView) {
|
|
657
|
+
((ITVView) view).setAutoFocus(autoFocus, true);
|
|
658
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ":setAutoFocusForce " + autoFocus + " view is :" + ExtendUtil.debugViewLite(view));
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
@Override
|
|
663
|
+
public void onFocusChange(final View v, boolean hasFocus) {
|
|
664
|
+
HippyMap hippyMap = new HippyMap();
|
|
665
|
+
hippyMap.pushBoolean("isFocused", hasFocus);
|
|
666
|
+
hippyMap.pushString("sid", ExtendUtil.getViewSID(v));
|
|
667
|
+
if (mFocusEvent == null) {
|
|
668
|
+
mFocusEvent = new HippyViewEvent("onFocus");
|
|
669
|
+
}
|
|
670
|
+
if (v instanceof TriggerTaskHost) {
|
|
671
|
+
if (hasFocus) {
|
|
672
|
+
TriggerTaskManagerModule.dispatchTriggerTask((TriggerTaskHost) v, "onFocused");
|
|
673
|
+
} else {
|
|
674
|
+
TriggerTaskManagerModule.dispatchTriggerTask((TriggerTaskHost) v, "unFocused");
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
mFocusEvent.send(v, hippyMap);
|
|
678
|
+
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
@HippyControllerProps(name = NodeProps.LINEAR_GRADIENT, defaultType = HippyControllerProps.MAP)
|
|
683
|
+
public void setLinearGradient(T view, HippyMap linearGradient) {
|
|
684
|
+
if (linearGradient != null && view instanceof IGradient) {
|
|
685
|
+
String angle = linearGradient.getString("angle");
|
|
686
|
+
HippyArray colorStopList = linearGradient.getArray("colorStopList");
|
|
687
|
+
|
|
688
|
+
if (TextUtils.isEmpty(angle) || colorStopList == null || colorStopList.size() == 0) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
int size = colorStopList.size();
|
|
693
|
+
ArrayList<Integer> colorsArray = new ArrayList<>();
|
|
694
|
+
ArrayList<Float> positionsArray = new ArrayList<>();
|
|
695
|
+
for (int i = 0; i < size; i++) {
|
|
696
|
+
HippyMap colorStop = colorStopList.getMap(i);
|
|
697
|
+
if (colorStop == null) {
|
|
698
|
+
continue;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
int color = colorStop.getInt("color");
|
|
702
|
+
colorsArray.add(color);
|
|
703
|
+
|
|
704
|
+
float ratio = 0.0f;
|
|
705
|
+
if (colorStop.containsKey("ratio")) {
|
|
706
|
+
ratio = (float) colorStop.getDouble("ratio");
|
|
707
|
+
} else if (i == (size - 1)) {
|
|
708
|
+
ratio = 1.0f;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
positionsArray.add(ratio);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
((IGradient) view).setGradientAngle(angle);
|
|
715
|
+
((IGradient) view).setGradientColors(colorsArray);
|
|
716
|
+
((IGradient) view).setGradientPositions(positionsArray);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
@HippyControllerProps(name = NodeProps.SHADOW_OFFSET, defaultType = HippyControllerProps.MAP)
|
|
721
|
+
public void setShadowOffset(T view, HippyMap shadowOffset) {
|
|
722
|
+
if (shadowOffset != null && view instanceof IShadow) {
|
|
723
|
+
float shadowOffsetX = shadowOffset.getInt("x");
|
|
724
|
+
float shadowOffsetY = shadowOffset.getInt("y");
|
|
725
|
+
((IShadow) view).setShadowOffsetX(shadowOffsetX);
|
|
726
|
+
((IShadow) view).setShadowOffsetY(shadowOffsetY);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
@HippyControllerProps(name = NodeProps.SHADOW_OFFSET_X, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
731
|
+
public void setShadowOffsetX(T view, float shadowOffsetX) {
|
|
732
|
+
if (view instanceof IShadow)
|
|
733
|
+
((IShadow) view).setShadowOffsetX(shadowOffsetX);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
@HippyControllerProps(name = NodeProps.SHADOW_OFFSET_Y, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
737
|
+
public void setShadowOffsetY(T view, float shadowOffsetY) {
|
|
738
|
+
if (view instanceof IShadow)
|
|
739
|
+
((IShadow) view).setShadowOffsetY(shadowOffsetY);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
@HippyControllerProps(name = NodeProps.SHADOW_OPACITY, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
743
|
+
public void setShadowOpacity(T view, float shadowOpacity) {
|
|
744
|
+
if (view instanceof IShadow) {
|
|
745
|
+
((IShadow) view).setShadowOpacity(shadowOpacity);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
@HippyControllerProps(name = NodeProps.SHADOW_RADIUS, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
750
|
+
public void setShadowRadius(T view, float shadowRadius) {
|
|
751
|
+
if (view instanceof IShadow) {
|
|
752
|
+
((IShadow) view).setShadowRadius(shadowRadius);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
@HippyControllerProps(name = NodeProps.SHADOW_SPREAD, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
757
|
+
public void setShadowSpread(T view, float shadowSpread) {
|
|
758
|
+
if (view instanceof IShadow) {
|
|
759
|
+
((IShadow) view).setShadowSpread(shadowSpread);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
@HippyControllerProps(name = NodeProps.SHADOW_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
764
|
+
public void setShadowColor(T view, int shadowColor) {
|
|
765
|
+
if (view instanceof IShadow) {
|
|
766
|
+
((IShadow) view).setShadowColor(shadowColor);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
@HippyControllerProps(name = NodeProps.BORDER_LEFT_WIDTH, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
771
|
+
public void setLeftBorderWidth(T view, float borderLeftWidth) {
|
|
772
|
+
if (view instanceof CommonBorder) {
|
|
773
|
+
((CommonBorder) view)
|
|
774
|
+
.setBorderWidth(borderLeftWidth, CommonBorder.BorderWidthDirection.LEFT.ordinal());
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
@HippyControllerProps(name = NodeProps.BORDER_TOP_WIDTH, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
780
|
+
public void setTopBorderWidth(T view, float borderTopWidth) {
|
|
781
|
+
if (view instanceof CommonBorder) {
|
|
782
|
+
((CommonBorder) view)
|
|
783
|
+
.setBorderWidth(borderTopWidth, CommonBorder.BorderWidthDirection.TOP.ordinal());
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
@HippyControllerProps(name = NodeProps.BORDER_RIGHT_WIDTH, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
789
|
+
public void setRightBorderWidth(T view, float borderRightWidth) {
|
|
790
|
+
if (view instanceof CommonBorder) {
|
|
791
|
+
((CommonBorder) view)
|
|
792
|
+
.setBorderWidth(borderRightWidth, CommonBorder.BorderWidthDirection.RIGHT.ordinal());
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
@HippyControllerProps(name = NodeProps.BORDER_BOTTOM_WIDTH, defaultType = HippyControllerProps.NUMBER, defaultNumber = 0)
|
|
798
|
+
public void setBottomBorderWidth(T view, float borderBottomWidth) {
|
|
799
|
+
if (view instanceof CommonBorder) {
|
|
800
|
+
((CommonBorder) view)
|
|
801
|
+
.setBorderWidth(borderBottomWidth, CommonBorder.BorderWidthDirection.BOTTOM.ordinal());
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
@HippyControllerProps(name = NodeProps.BORDER_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
807
|
+
public void setBorderColor(T view, int borderColor) {
|
|
808
|
+
if (view instanceof CommonBorder) {
|
|
809
|
+
((CommonBorder) view)
|
|
810
|
+
.setBorderColor(borderColor, CommonBorder.BorderWidthDirection.ALL.ordinal());
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
@HippyControllerProps(name = NodeProps.BORDER_LEFT_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
815
|
+
public void setBorderLeftColor(T view, int borderLeftColor) {
|
|
816
|
+
if (view instanceof CommonBorder) {
|
|
817
|
+
((CommonBorder) view)
|
|
818
|
+
.setBorderColor(borderLeftColor, CommonBorder.BorderWidthDirection.LEFT.ordinal());
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
@HippyControllerProps(name = NodeProps.BORDER_TOP_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
824
|
+
public void setBorderTopWidth(T view, int borderTopColor) {
|
|
825
|
+
if (view instanceof CommonBorder) {
|
|
826
|
+
((CommonBorder) view)
|
|
827
|
+
.setBorderColor(borderTopColor, CommonBorder.BorderWidthDirection.TOP.ordinal());
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
@HippyControllerProps(name = NodeProps.BORDER_RIGHT_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
832
|
+
public void setBorderRightWidth(T view, int borderRightColor) {
|
|
833
|
+
if (view instanceof CommonBorder) {
|
|
834
|
+
((CommonBorder) view)
|
|
835
|
+
.setBorderColor(borderRightColor, CommonBorder.BorderWidthDirection.RIGHT.ordinal());
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
@HippyControllerProps(name = NodeProps.BORDER_BOTTOM_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
841
|
+
public void setBorderBottomWidth(T view, int borderBottomColor) {
|
|
842
|
+
if (view instanceof CommonBorder) {
|
|
843
|
+
((CommonBorder) view)
|
|
844
|
+
.setBorderColor(borderBottomColor, CommonBorder.BorderWidthDirection.BOTTOM.ordinal());
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* touch/click
|
|
850
|
+
**/
|
|
851
|
+
@HippyControllerProps(name = NodeProps.ON_CLICK, defaultType = HippyControllerProps.BOOLEAN)
|
|
852
|
+
public void setClickable(T view, boolean flag) {
|
|
853
|
+
if (!handleGestureBySelf()) {
|
|
854
|
+
if (flag) {
|
|
855
|
+
view.setOnClickListener(NativeGestureDispatcher.getOnClickListener());
|
|
856
|
+
} else {
|
|
857
|
+
view.setOnClickListener(null);
|
|
858
|
+
view.setClickable(false);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* 2.11.x
|
|
865
|
+
*
|
|
866
|
+
* @param view
|
|
867
|
+
* @param flag
|
|
868
|
+
*/
|
|
869
|
+
@HippyControllerProps(name = "clickable", defaultType = HippyControllerProps.BOOLEAN)
|
|
870
|
+
public void setClickableDirect(T view, boolean flag) {
|
|
871
|
+
view.setClickable(flag);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* 2.11.x
|
|
876
|
+
*
|
|
877
|
+
* @param view
|
|
878
|
+
* @param flag
|
|
879
|
+
*/
|
|
880
|
+
@HippyControllerProps(name = "enabled", defaultType = HippyControllerProps.BOOLEAN)
|
|
881
|
+
public void setEnabled(T view, boolean flag) {
|
|
882
|
+
view.setEnabled(flag);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
@HippyControllerProps(name = NodeProps.ON_LONG_CLICK, defaultType = HippyControllerProps.BOOLEAN)
|
|
887
|
+
public void setLongClickable(T view, boolean flag) {
|
|
888
|
+
if (!handleGestureBySelf()) {
|
|
889
|
+
if (flag) {
|
|
890
|
+
view.setOnLongClickListener(NativeGestureDispatcher.getOnLongClickListener());
|
|
891
|
+
} else {
|
|
892
|
+
view.setOnLongClickListener(null);
|
|
893
|
+
view.setLongClickable(false);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
@HippyControllerProps(name = NodeProps.ON_PRESS_IN, defaultType = HippyControllerProps.BOOLEAN)
|
|
899
|
+
public void setPressInable(T view, boolean flag) {
|
|
900
|
+
if (!handleGestureBySelf()) {
|
|
901
|
+
setGestureType(view, NodeProps.ON_PRESS_IN, flag);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
@HippyControllerProps(name = NodeProps.ON_PRESS_OUT, defaultType = HippyControllerProps.BOOLEAN)
|
|
906
|
+
public void setPressOutable(T view, boolean flag) {
|
|
907
|
+
if (!handleGestureBySelf()) {
|
|
908
|
+
setGestureType(view, NodeProps.ON_PRESS_OUT, flag);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
@HippyControllerProps(name = NodeProps.ON_TOUCH_DOWN, defaultType = HippyControllerProps.BOOLEAN)
|
|
913
|
+
public void setTouchDownHandle(T view, boolean flag) {
|
|
914
|
+
if (!handleGestureBySelf()) {
|
|
915
|
+
setGestureType(view, NodeProps.ON_TOUCH_DOWN, flag);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
@HippyControllerProps(name = NodeProps.ON_TOUCH_MOVE, defaultType = HippyControllerProps.BOOLEAN)
|
|
920
|
+
public void setTouchMoveHandle(T view, boolean flag) {
|
|
921
|
+
if (!handleGestureBySelf()) {
|
|
922
|
+
setGestureType(view, NodeProps.ON_TOUCH_MOVE, flag);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
@HippyControllerProps(name = NodeProps.ON_TOUCH_END, defaultType = HippyControllerProps.BOOLEAN)
|
|
927
|
+
public void setTouchEndHandle(T view, boolean flag) {
|
|
928
|
+
if (!handleGestureBySelf()) {
|
|
929
|
+
setGestureType(view, NodeProps.ON_TOUCH_END, flag);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
@HippyControllerProps(name = NodeProps.ON_TOUCH_CANCEL, defaultType = HippyControllerProps.BOOLEAN)
|
|
934
|
+
public void setTouchCancelHandle(T view, boolean flag) {
|
|
935
|
+
if (!handleGestureBySelf()) {
|
|
936
|
+
setGestureType(view, NodeProps.ON_TOUCH_CANCEL, flag);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
@HippyControllerProps(name = NodeProps.ON_ATTACHED_TO_WINDOW, defaultType = HippyControllerProps.BOOLEAN)
|
|
941
|
+
public void setAttachedToWindowHandle(T view, boolean flag) {
|
|
942
|
+
if (flag) {
|
|
943
|
+
view.addOnAttachStateChangeListener(NativeGestureDispatcher.getOnAttachedToWindowListener());
|
|
944
|
+
} else {
|
|
945
|
+
view.removeOnAttachStateChangeListener(
|
|
946
|
+
NativeGestureDispatcher.getOnAttachedToWindowListener());
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
@HippyControllerProps(name = NodeProps.ON_DETACHED_FROM_WINDOW, defaultType = HippyControllerProps.BOOLEAN)
|
|
951
|
+
public void setDetachedFromWindowHandle(T view, boolean flag) {
|
|
952
|
+
if (flag) {
|
|
953
|
+
view.addOnAttachStateChangeListener(
|
|
954
|
+
NativeGestureDispatcher.getOnDetachedFromWindowListener());
|
|
955
|
+
} else {
|
|
956
|
+
view.removeOnAttachStateChangeListener(
|
|
957
|
+
NativeGestureDispatcher.getOnDetachedFromWindowListener());
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
@HippyControllerProps(name = "renderToHardwareTextureAndroid", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
962
|
+
public void setRenderToHardwareTexture(T view, boolean useHWTexture) {
|
|
963
|
+
view.setLayerType(useHWTexture ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE, null);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
@SuppressWarnings("EmptyMethod")
|
|
967
|
+
@HippyControllerProps(name = NodeProps.CUSTOM_PROP)
|
|
968
|
+
public void setCustomProp(T view, String methodName, Object props) {
|
|
969
|
+
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
protected void setGestureType(T view, String type, boolean flag) {
|
|
973
|
+
// add by weipeng
|
|
974
|
+
// 自定义的组件为实现HippyViewBase接口,需要判断下
|
|
975
|
+
if (!(view instanceof HippyViewBase)) return;
|
|
976
|
+
if (flag) {
|
|
977
|
+
if (view.getGestureDispatcher() == null) {
|
|
978
|
+
view.setGestureDispatcher(new NativeGestureDispatcher(view));
|
|
979
|
+
}
|
|
980
|
+
view.getGestureDispatcher().addGestureType(type);
|
|
981
|
+
} else {
|
|
982
|
+
if (view.getGestureDispatcher() != null) {
|
|
983
|
+
view.getGestureDispatcher().removeGestureType(type);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
public RenderNode createRenderNode(int id, HippyMap props, String className,
|
|
989
|
+
HippyRootView hippyRootView, ControllerManager controllerManager,
|
|
990
|
+
boolean lazy) {
|
|
991
|
+
return new RenderNode(id, props, className, hippyRootView, controllerManager, lazy);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
private void applyTransform(T view, HippyArray transformArray) {
|
|
995
|
+
TransformUtil.processTransform(transformArray, sTransformDecompositionArray);
|
|
996
|
+
sMatrixDecompositionContext.reset();
|
|
997
|
+
MatrixUtil.decomposeMatrix(sTransformDecompositionArray, sMatrixDecompositionContext);
|
|
998
|
+
view.setTranslationX(PixelUtil.dp2px((float) sMatrixDecompositionContext.translation[0]));
|
|
999
|
+
view.setTranslationY(PixelUtil.dp2px((float) sMatrixDecompositionContext.translation[1]));
|
|
1000
|
+
view.setRotation((float) sMatrixDecompositionContext.rotationDegrees[2]);
|
|
1001
|
+
view.setRotationX((float) sMatrixDecompositionContext.rotationDegrees[0]);
|
|
1002
|
+
view.setRotationY((float) sMatrixDecompositionContext.rotationDegrees[1]);
|
|
1003
|
+
view.setScaleX((float) sMatrixDecompositionContext.scale[0]);
|
|
1004
|
+
view.setScaleY((float) sMatrixDecompositionContext.scale[1]);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
public static void resetTransform(View view) {
|
|
1008
|
+
view.setTranslationX(0);
|
|
1009
|
+
view.setTranslationY(0);
|
|
1010
|
+
view.setRotation(0);
|
|
1011
|
+
view.setRotationX(0);
|
|
1012
|
+
view.setRotationY(0);
|
|
1013
|
+
view.setScaleX(1);
|
|
1014
|
+
view.setScaleY(1);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/***
|
|
1018
|
+
* dispatch the js call UI Function.
|
|
1019
|
+
* @see #dispatchFunction(View, String, HippyArray, Promise)
|
|
1020
|
+
* @param view
|
|
1021
|
+
* @param functionName
|
|
1022
|
+
* @param var
|
|
1023
|
+
*/
|
|
1024
|
+
public void dispatchFunction(T view, String functionName, HippyArray var) {
|
|
1025
|
+
// if("dispatchFunctionBySid".equals(functionName)){
|
|
1026
|
+
// Log.e(ReplaceChildView.TAG,"native call dispatchFunctionBySid var"+var);
|
|
1027
|
+
// }
|
|
1028
|
+
if (LogUtils.isDebug()) {
|
|
1029
|
+
Log.d(TAG, "dispatchFunction functionName:" + functionName + ",var :" + var + ",callView:" + ExtendUtil.debugViewLite(view));
|
|
1030
|
+
//Log.d(FastListView.TAG_CLONED,"dispatchFunction functionName:"+functionName+",var :"+var+",view:"+view);
|
|
1031
|
+
}
|
|
1032
|
+
if (FastListViewController.dispatchFunctionByTemplate(this, view, functionName, var, null)) {
|
|
1033
|
+
// Log.e(ReplaceChildView.TAG,"native call dispatchFunctionBySid return on dispatchFunctionByTemplate");
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
switch (functionName) {
|
|
1037
|
+
case "requestFocus":
|
|
1038
|
+
if (LogUtils.isDebug()) {
|
|
1039
|
+
Log.e(FocusDispatchView.TAG, "requestFocus by dispatchFunction view:" + view.getId());
|
|
1040
|
+
}
|
|
1041
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">requestFocus view is :" + ExtendUtil.debugViewLite(view));
|
|
1042
|
+
if (var.size() > 0) {
|
|
1043
|
+
int direction = var.getInt(0);
|
|
1044
|
+
view.requestFocus(direction);
|
|
1045
|
+
} else {
|
|
1046
|
+
requestFocus(view, true);
|
|
1047
|
+
}
|
|
1048
|
+
break;
|
|
1049
|
+
|
|
1050
|
+
case "requestFocusDirectly":
|
|
1051
|
+
if (LogUtils.isDebug()) {
|
|
1052
|
+
Log.e(FocusDispatchView.TAG, "requestFocusDirectly by dispatchFunction view:" + view.getId());
|
|
1053
|
+
}
|
|
1054
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">requestFocusDirectly view is :" + ExtendUtil.debugViewLite(view));
|
|
1055
|
+
if (var.size() > 0) {
|
|
1056
|
+
int direction = var.getInt(0);
|
|
1057
|
+
view.requestFocus(direction);
|
|
1058
|
+
} else {
|
|
1059
|
+
view.requestFocus();
|
|
1060
|
+
}
|
|
1061
|
+
break;
|
|
1062
|
+
case "requestRootLayout":
|
|
1063
|
+
LogUtils.d("hippy", "requestRootLayout called by :" + view.getId());
|
|
1064
|
+
if (view.getRootView() != null) {
|
|
1065
|
+
view.getRootView().requestLayout();
|
|
1066
|
+
}
|
|
1067
|
+
break;
|
|
1068
|
+
case "requestLayout":
|
|
1069
|
+
LogUtils.d("hippy", "requestLayout called by :" + view.getId());
|
|
1070
|
+
view.requestLayout();
|
|
1071
|
+
break;
|
|
1072
|
+
case "setDescendantFocusability":
|
|
1073
|
+
if (view instanceof ViewGroup) {
|
|
1074
|
+
if (var.size() > 0) {
|
|
1075
|
+
int focusAbility = var.getInt(0);
|
|
1076
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">setDescendantFocusability " + focusAbility + "view is :" + ExtendUtil.debugViewLite(view));
|
|
1077
|
+
Log.d("hippy", "setDescendantFocusability :" + focusAbility);
|
|
1078
|
+
((ViewGroup) view).setDescendantFocusability(focusAbility);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
break;
|
|
1082
|
+
|
|
1083
|
+
case "changeDescendantFocusability":
|
|
1084
|
+
if (view instanceof ViewGroup) {
|
|
1085
|
+
if (var.size() > 0) {
|
|
1086
|
+
String focusAbility = var.getString(0);
|
|
1087
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">changeDescendantFocusability " + focusAbility + "view is :" + ExtendUtil.debugViewLite(view));
|
|
1088
|
+
int focusAbilityInt = ViewGroup.FOCUS_AFTER_DESCENDANTS;
|
|
1089
|
+
switch (focusAbility) {
|
|
1090
|
+
case "beforeDescendants":
|
|
1091
|
+
((ViewGroup) view).setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
|
|
1092
|
+
break;
|
|
1093
|
+
case "blockDescendants":
|
|
1094
|
+
((ViewGroup) view).setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
|
1095
|
+
break;
|
|
1096
|
+
default:
|
|
1097
|
+
((ViewGroup) view).setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
|
|
1098
|
+
break;
|
|
1099
|
+
}
|
|
1100
|
+
LogUtils.d(FocusDispatchView.TAG, "changeDescendantFocusability request focusAbility:" + focusAbility + " ,result :" + focusAbilityInt + ", view:" + view);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
break;
|
|
1104
|
+
case "forceUpdateRenderNode":
|
|
1105
|
+
if (view != null) {
|
|
1106
|
+
Log.d("viewController", "forceUpdateRenderNode called,id:" + view.getId());
|
|
1107
|
+
final Context context = view.getContext();
|
|
1108
|
+
if (context instanceof HippyInstanceContext) {
|
|
1109
|
+
final HippyEngineContext hippyContext = ((HippyInstanceContext) context).getEngineContext();
|
|
1110
|
+
if (context != null) {
|
|
1111
|
+
final RenderNode node = hippyContext.getRenderManager().getRenderNode(view.getId());
|
|
1112
|
+
if (node != null && !node.isDelete()) {
|
|
1113
|
+
node.updateViewLayoutRecursive();
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
break;
|
|
1119
|
+
case "setBackGroundColor":
|
|
1120
|
+
if (view != null) {
|
|
1121
|
+
try {
|
|
1122
|
+
setBackgroundString(view, var.getString(0));
|
|
1123
|
+
view.invalidate();
|
|
1124
|
+
} catch (Exception e) {
|
|
1125
|
+
if (LogUtils.isDebug()) {
|
|
1126
|
+
e.printStackTrace();
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
break;
|
|
1131
|
+
case "layoutViewManual":
|
|
1132
|
+
if (view != null) {
|
|
1133
|
+
ExtendUtil.layoutViewManual(view);
|
|
1134
|
+
}
|
|
1135
|
+
break;
|
|
1136
|
+
case "blockRootFocus":
|
|
1137
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">blockRootFocus view is :" + ExtendUtil.debugViewLite(view));
|
|
1138
|
+
InternalExtendViewUtil.blockRootFocus(view);
|
|
1139
|
+
break;
|
|
1140
|
+
case "clearFocus":
|
|
1141
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">clearFocus view is :" + ExtendUtil.debugViewLite(view));
|
|
1142
|
+
InternalExtendViewUtil.clearFocus(view);
|
|
1143
|
+
break;
|
|
1144
|
+
case "unBlockRootFocus":
|
|
1145
|
+
if (LogUtils.isDebug()) {
|
|
1146
|
+
LogUtils.e(FocusDispatchView.TAG, "unBlockRootFocus by ViewController view:" + view.getId());
|
|
1147
|
+
}
|
|
1148
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">unBlockRootFocus view is :" + ExtendUtil.debugViewLite(view));
|
|
1149
|
+
InternalExtendViewUtil.unBlockRootFocus(view);
|
|
1150
|
+
break;
|
|
1151
|
+
case "changeVisibility":
|
|
1152
|
+
final String visi = var.getString(0);
|
|
1153
|
+
switch (visi) {
|
|
1154
|
+
case "visible":
|
|
1155
|
+
view.setVisibility(View.VISIBLE);
|
|
1156
|
+
break;
|
|
1157
|
+
case "invisible":
|
|
1158
|
+
view.setVisibility(View.INVISIBLE);
|
|
1159
|
+
break;
|
|
1160
|
+
case "gone":
|
|
1161
|
+
view.setVisibility(View.GONE);
|
|
1162
|
+
break;
|
|
1163
|
+
}
|
|
1164
|
+
break;
|
|
1165
|
+
case "changeAlpha":
|
|
1166
|
+
final double alpha = var.getDouble(0);
|
|
1167
|
+
view.setAlpha((float) alpha);
|
|
1168
|
+
break;
|
|
1169
|
+
case "setScale":
|
|
1170
|
+
final double scaleX = var.getDouble(0);
|
|
1171
|
+
final double scaleY = var.getDouble(1);
|
|
1172
|
+
final int duration = var.getInt(2);
|
|
1173
|
+
if (duration <= 0) {
|
|
1174
|
+
view.setScaleX((float) scaleX);
|
|
1175
|
+
view.setScaleY((float) scaleY);
|
|
1176
|
+
view.invalidate();
|
|
1177
|
+
} else {
|
|
1178
|
+
TVFocusScaleExcuter.bounceScaleTo(view, (float) scaleX, (float) scaleY, duration);
|
|
1179
|
+
}
|
|
1180
|
+
break;
|
|
1181
|
+
case "setPosition":
|
|
1182
|
+
final int px = var.getInt(0);
|
|
1183
|
+
final int py = var.getInt(1);
|
|
1184
|
+
final int pz = var.getInt(2);
|
|
1185
|
+
view.setX(Utils.toPX(px));
|
|
1186
|
+
view.setY(Utils.toPX(py));
|
|
1187
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
1188
|
+
view.setZ(Utils.toPX(pz));
|
|
1189
|
+
}
|
|
1190
|
+
break;
|
|
1191
|
+
case "updateLayout":
|
|
1192
|
+
if (view != null) {
|
|
1193
|
+
final int width = Utils.toPX(var.getInt(0));
|
|
1194
|
+
final int height = Utils.toPX(var.getInt(1));
|
|
1195
|
+
final int x = Utils.toPX(var.getInt(2));
|
|
1196
|
+
final int y = Utils.toPX(var.getInt(3));
|
|
1197
|
+
if (var.size() >= 5 && var.getBoolean(4) && view.getId() != -1) {
|
|
1198
|
+
RenderUtil.updateDomLayout(x, y, width, height, view);
|
|
1199
|
+
} else {
|
|
1200
|
+
view.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
|
|
1201
|
+
View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
|
|
1202
|
+
if (!shouldInterceptLayout(view, x, y, width, height)) {
|
|
1203
|
+
view.layout(x, y, x + width, y + height);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
break;
|
|
1208
|
+
case "invalidate":
|
|
1209
|
+
view.invalidate();
|
|
1210
|
+
break;
|
|
1211
|
+
case "deepInvalidate":
|
|
1212
|
+
deepInvalidate(view, var);
|
|
1213
|
+
break;
|
|
1214
|
+
case "changeProgress":
|
|
1215
|
+
if (view instanceof ProgressBar) {
|
|
1216
|
+
final ProgressBar pb = (ProgressBar) view;
|
|
1217
|
+
final int progress = var.getInt(0);
|
|
1218
|
+
final int secondProgress = var.getInt(1);
|
|
1219
|
+
final int max = var.getInt(2);
|
|
1220
|
+
pb.setProgress(progress);
|
|
1221
|
+
pb.setSecondaryProgress(secondProgress);
|
|
1222
|
+
pb.setMax(max);
|
|
1223
|
+
}
|
|
1224
|
+
break;
|
|
1225
|
+
case "dispatchFunctionForTarget":
|
|
1226
|
+
final String targetName = var.getString(0);
|
|
1227
|
+
final String functionTargetName = var.getString(1);
|
|
1228
|
+
final View root = InternalExtendViewUtil.getRootView(view);
|
|
1229
|
+
if (root != null) {
|
|
1230
|
+
final View target = ControllerManager.findViewByName(root, targetName);
|
|
1231
|
+
if (target != null && functionTargetName != null && !"dispatchFunctionForTarget".equals(functionTargetName)) {
|
|
1232
|
+
final HippyArray array = var.getArray(2);
|
|
1233
|
+
int delay = 0;
|
|
1234
|
+
if (var.size() > 3) {
|
|
1235
|
+
delay = var.getInt(3);
|
|
1236
|
+
}
|
|
1237
|
+
final Context context = view.getContext();
|
|
1238
|
+
if (context instanceof HippyInstanceContext) {
|
|
1239
|
+
final HippyEngineContext hippyContext = ((HippyInstanceContext) context).getEngineContext();
|
|
1240
|
+
final RenderNode node = hippyContext.getRenderManager().getRenderNode(view.getId());
|
|
1241
|
+
final String className = node.getClassName();
|
|
1242
|
+
if (LogUtils.isDebug()) {
|
|
1243
|
+
Log.v("hippy", "dispatchFunctionForTarget view:" + view.getId() + ",className:" + className + ",functionTargetName:" + functionTargetName + ",array :" + array + ",delay:" + delay);
|
|
1244
|
+
}
|
|
1245
|
+
hippyContext.getRenderManager().getControllerManager().dispatchUIFunction(view.getId(), className, functionTargetName, array, delay);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
break;
|
|
1250
|
+
|
|
1251
|
+
case "setBlockFocusDirections":
|
|
1252
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">setBlockFocusDirections " + var.getArray(0) + " view is :" + ExtendUtil.debugViewLite(view));
|
|
1253
|
+
this.setBlockFocusDirectionsV2(view, var.getArray(0));
|
|
1254
|
+
break;
|
|
1255
|
+
case "setBlockFocusDirectionsOnFail":
|
|
1256
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">setBlockFocusDirectionsOnFail " + var.getArray(0) + " view is :" + ExtendUtil.debugViewLite(view));
|
|
1257
|
+
this.setBlockFocusDirectionsOnFail(view, var.getArray(0));
|
|
1258
|
+
break;
|
|
1259
|
+
case "dispatchTVItemFunction":
|
|
1260
|
+
this.dispatchTVItemFunction(view, var, null);
|
|
1261
|
+
break;
|
|
1262
|
+
//2.6
|
|
1263
|
+
case "setInitFocus":
|
|
1264
|
+
case "setAutoFocus":
|
|
1265
|
+
final View rootView = HippyViewGroup.findPageRootView(view);
|
|
1266
|
+
Log.i(AutoFocusManager.TAG, "setAutoFocus called rootView is :" + rootView + ",var:" + var);
|
|
1267
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">setAutoFocus params" + var + " view is :" + ExtendUtil.debugViewLite(view));
|
|
1268
|
+
if (rootView instanceof HippyViewGroup) {
|
|
1269
|
+
int delay = var.size() == 2 ? var.getInt(1) : -1;
|
|
1270
|
+
if (delay > 0 && view.getId() != -1) {
|
|
1271
|
+
((HippyViewGroup) rootView).getAutoFocusManager().setGlobalAutofocusSID(var.getString(0), delay, view);
|
|
1272
|
+
} else {
|
|
1273
|
+
((HippyViewGroup) rootView).getAutoFocusManager().setGlobalAutofocusSID(var.getString(0), var.size() == 2 ? var.getInt(1) : -1);
|
|
1274
|
+
}
|
|
1275
|
+
} else {
|
|
1276
|
+
//final View rootView = HippyViewGroup.findPageRootView(view);
|
|
1277
|
+
Log.e(AutoFocusManager.TAG, "setAutoFocus called error rootView is :" + rootView);
|
|
1278
|
+
}
|
|
1279
|
+
break;
|
|
1280
|
+
case "setAutofocus":
|
|
1281
|
+
boolean autofocus = var.getBoolean(0);
|
|
1282
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">setAutofocus " + autofocus + " view is :" + ExtendUtil.debugViewLite(view));
|
|
1283
|
+
if (view instanceof ITVView) {
|
|
1284
|
+
((ITVView) view).setAutoFocus(autofocus, true);
|
|
1285
|
+
}
|
|
1286
|
+
break;
|
|
1287
|
+
case "dispatchFunctionBySid":
|
|
1288
|
+
dispatchFunctionBySid(view, var, null);
|
|
1289
|
+
break;
|
|
1290
|
+
case "requestAutofocus":
|
|
1291
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, ">requestAutofocus view is :" + ExtendUtil.debugViewLite(view));
|
|
1292
|
+
AutoFocusManager.requestAutofocusTraverse(view);
|
|
1293
|
+
break;
|
|
1294
|
+
case "keepScreenOn":
|
|
1295
|
+
if (var.size() == 0) {
|
|
1296
|
+
LogAdapterUtils.log(view.getContext(), TAG, ">keepScreenOn param is EMPTY");
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
view.setKeepScreenOn(var.getBoolean(0));
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
private void deepInvalidate(View view, HippyArray var) {
|
|
1305
|
+
int upLevel = 0;
|
|
1306
|
+
if (var != null && var.size() > 0) {
|
|
1307
|
+
HippyMap params = var.getMap(0);
|
|
1308
|
+
upLevel = params.getInt("upLevel");
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
if(LogUtils.isDebug()) {
|
|
1312
|
+
Log.i(TAG, "deepInvalidate upLevel:" + upLevel);
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
View targetView = view;
|
|
1316
|
+
while (--upLevel >= 0) {
|
|
1317
|
+
ViewParent parent = targetView.getParent();
|
|
1318
|
+
if (parent == null) break;
|
|
1319
|
+
if (!(parent instanceof View)) break;
|
|
1320
|
+
targetView = (View) parent;
|
|
1321
|
+
}
|
|
1322
|
+
if(LogUtils.isDebug()) {
|
|
1323
|
+
Log.i(TAG, "deepInvalidate view:" + targetView);
|
|
1324
|
+
}
|
|
1325
|
+
deepInvalidate(targetView);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
private void deepInvalidate(View view) {
|
|
1329
|
+
if (view instanceof ViewGroup) {
|
|
1330
|
+
int childCount = ((ViewGroup) view).getChildCount();
|
|
1331
|
+
for (int i = 0; i < childCount; i++) {
|
|
1332
|
+
deepInvalidate(((ViewGroup) view).getChildAt(i));
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
view.invalidate();
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
private void dispatchTVItemFunction(T view, HippyArray var, Promise promise) {
|
|
1339
|
+
final String id = var.getString(0);
|
|
1340
|
+
final String name = var.getString(1);
|
|
1341
|
+
final String functionName = var.getString(2);
|
|
1342
|
+
final HippyArray params = var.getArray(3);
|
|
1343
|
+
FastItemView templateItemView = FastItemView.findTemplateItemView(view);
|
|
1344
|
+
if (templateItemView == null) {
|
|
1345
|
+
Log.e(TAG, "dispatchTVItemFunction error on templateItemView == null id:" + id + ",name:" + name + ",functionName:" + functionName);
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
View rootView;
|
|
1349
|
+
rootView = FocusDispatchView.findRootFromContext(view);
|
|
1350
|
+
if (rootView == null) {
|
|
1351
|
+
View parentView = templateItemView.getParentListView();
|
|
1352
|
+
if (parentView == null) {
|
|
1353
|
+
parentView = templateItemView.getParentFlexView();
|
|
1354
|
+
}
|
|
1355
|
+
rootView = HippyViewGroup.findPageRootView(parentView);
|
|
1356
|
+
if (rootView == null) {
|
|
1357
|
+
rootView = FocusDispatchView.findRootView(parentView);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
final FastItemView itemView = FastAdapter.findTVItemViewById(rootView, id);
|
|
1361
|
+
// if(LogUtils.isDebug()){
|
|
1362
|
+
// FastAdapter.logTVItemViewById(rootView,id);
|
|
1363
|
+
// }
|
|
1364
|
+
final View targetView = ControllerManager.findViewByName(itemView, name);
|
|
1365
|
+
if (LogUtils.isDebug()) {
|
|
1366
|
+
Log.i(TAG, "dispatchTVItemFunction id:" + id + ",name:" + name + ",functionName:" + functionName + ",params:" + params);
|
|
1367
|
+
Log.i(TAG, "dispatchTVItemFunction itemView:" + itemView + ",targetView:" + targetView + ",rootView:" + rootView);
|
|
1368
|
+
}
|
|
1369
|
+
if (targetView != null) {
|
|
1370
|
+
if (promise != null) {
|
|
1371
|
+
this.dispatchFunction((T) targetView, functionName, params, promise);
|
|
1372
|
+
} else {
|
|
1373
|
+
this.dispatchFunction((T) targetView, functionName, params);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
private void setBlockFocusDirectionsV2(T view, HippyArray array) {
|
|
1379
|
+
if (view == null) {
|
|
1380
|
+
Log.e(TAG, "setBlockFocusDirectionsOnFail error array is null");
|
|
1381
|
+
return;
|
|
1382
|
+
}
|
|
1383
|
+
if (view instanceof TVSingleLineListView) {
|
|
1384
|
+
if (array == null || array.size() == 0) {
|
|
1385
|
+
((TVSingleLineListView) view).setBlockFocusOn(null);
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
int[] directions = new int[array.size()];
|
|
1389
|
+
for (int i = 0; i < array.size(); i++) {
|
|
1390
|
+
switch (array.getString(i)) {
|
|
1391
|
+
case "up":
|
|
1392
|
+
directions[i] = View.FOCUS_UP;
|
|
1393
|
+
break;
|
|
1394
|
+
case "down":
|
|
1395
|
+
directions[i] = View.FOCUS_DOWN;
|
|
1396
|
+
break;
|
|
1397
|
+
case "left":
|
|
1398
|
+
directions[i] = View.FOCUS_LEFT;
|
|
1399
|
+
break;
|
|
1400
|
+
case "right":
|
|
1401
|
+
directions[i] = View.FOCUS_RIGHT;
|
|
1402
|
+
break;
|
|
1403
|
+
case "all":
|
|
1404
|
+
((TVSingleLineListView) view).setBlockFocusOn(new int[]{View.FOCUS_UP, View.FOCUS_DOWN, View.FOCUS_LEFT, View.FOCUS_RIGHT});
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
((TVSingleLineListView) view).setBlockFocusOn(directions);
|
|
1409
|
+
} else {
|
|
1410
|
+
int nextID = view.getId();
|
|
1411
|
+
if (array == null || array.size() == 0) {
|
|
1412
|
+
nextID = View.NO_ID;
|
|
1413
|
+
view.setNextFocusUpId(nextID);
|
|
1414
|
+
view.setNextFocusDownId(nextID);
|
|
1415
|
+
view.setNextFocusLeftId(nextID);
|
|
1416
|
+
view.setNextFocusRightId(nextID);
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
for (int i = 0; i < array.size(); i++) {
|
|
1420
|
+
switch (array.getString(i)) {
|
|
1421
|
+
case "up":
|
|
1422
|
+
view.setNextFocusUpId(nextID);
|
|
1423
|
+
break;
|
|
1424
|
+
case "down":
|
|
1425
|
+
view.setNextFocusDownId(nextID);
|
|
1426
|
+
break;
|
|
1427
|
+
case "left":
|
|
1428
|
+
view.setNextFocusLeftId(nextID);
|
|
1429
|
+
break;
|
|
1430
|
+
case "right":
|
|
1431
|
+
view.setNextFocusRightId(nextID);
|
|
1432
|
+
break;
|
|
1433
|
+
case "all":
|
|
1434
|
+
view.setNextFocusUpId(nextID);
|
|
1435
|
+
view.setNextFocusDownId(nextID);
|
|
1436
|
+
view.setNextFocusLeftId(nextID);
|
|
1437
|
+
view.setNextFocusRightId(nextID);
|
|
1438
|
+
break;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
public void dispatchFunctionBySid(@Nullable View view, HippyArray var, Promise promise) {
|
|
1445
|
+
dispatchFunctionBySid(null, view, null, var.getString(0), var.getString(1), var.getArray(2), promise, TAG, false);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* 通过一个view的sid来执行对应的方法
|
|
1450
|
+
*
|
|
1451
|
+
* @param rootView 执行方法的根view
|
|
1452
|
+
* @param view vue上层传递过来调用此方法的view
|
|
1453
|
+
* @param instanceContext instanceContext
|
|
1454
|
+
* @param targetSID 执行的目标sid
|
|
1455
|
+
* @param functionTargetName 方法名
|
|
1456
|
+
* @param params 传递过来的参数
|
|
1457
|
+
* @param promise 回调
|
|
1458
|
+
*/
|
|
1459
|
+
public static void dispatchFunctionBySid(@Nullable View rootView, @Nullable View view, @Nullable HippyInstanceContext instanceContext, String targetSID, String functionTargetName, HippyArray params, @Nullable Promise promise, String TAG, boolean checkValid) {
|
|
1460
|
+
try {
|
|
1461
|
+
// final String targetSID = var.getString(0);
|
|
1462
|
+
// final String functionTargetName = var.getString(1);
|
|
1463
|
+
if (rootView == null && view == null) {
|
|
1464
|
+
Log.e(TAG, "dispatchFunctionBySid error on rootView and view both are null");
|
|
1465
|
+
if (promise != null) {
|
|
1466
|
+
promise.reject("dispatchFunctionBySid error on rootView and view both are null");
|
|
1467
|
+
}
|
|
1468
|
+
return;
|
|
1469
|
+
}
|
|
1470
|
+
final View root = rootView == null ? HippyViewGroup.findPageRootView(view) : rootView;
|
|
1471
|
+
// Log.e(ReplaceChildView.TAG, "dispatchFunctionBySid targetSID :" + targetSID + ",functionTargetName:" + functionTargetName +",root:"+root);
|
|
1472
|
+
Promise takeOverPromise = promise == null ? null : new FastListViewController.PromiseTakeover(promise, targetSID);
|
|
1473
|
+
if (root != null) {
|
|
1474
|
+
|
|
1475
|
+
// ExtendUtil.logView(ReplaceChildView.TAG,root);
|
|
1476
|
+
|
|
1477
|
+
final View target = ExtendUtil.findViewBySID(targetSID, root, checkValid);
|
|
1478
|
+
if (target != null && functionTargetName != null && !"dispatchFunctionBySid".equals(functionTargetName)) {
|
|
1479
|
+
// final HippyArray array = var.getArray(2);
|
|
1480
|
+
Context context = null;
|
|
1481
|
+
if (instanceContext != null) {
|
|
1482
|
+
context = instanceContext;
|
|
1483
|
+
} else {
|
|
1484
|
+
if (rootView != null) {
|
|
1485
|
+
context = rootView.getContext();
|
|
1486
|
+
} else {
|
|
1487
|
+
context = view.getContext();
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
// instanceContext == null && view != null ? view.getContext() : instanceContext;
|
|
1491
|
+
if (context instanceof HippyInstanceContext) {
|
|
1492
|
+
final HippyEngineContext hippyContext = ((HippyInstanceContext) context).getEngineContext();
|
|
1493
|
+
final String targetNodeClassName = ExtendTag.obtainExtendTag(target).nodeClassName;
|
|
1494
|
+
String className = targetNodeClassName;
|
|
1495
|
+
boolean executeOnThisView = false;
|
|
1496
|
+
if (view != null && targetSID != null && targetSID.equals(ExtendUtil.getViewSID(view))) {
|
|
1497
|
+
executeOnThisView = true;
|
|
1498
|
+
}
|
|
1499
|
+
//Log.i(TAG,"dispatchFunctionBySid executeOnThisView : "+executeOnThisView+",sid:"+targetSID+",dispatch view:"+ExtendUtil.debugViewLite(view));
|
|
1500
|
+
if (TextUtils.isEmpty(targetNodeClassName) && view != null && executeOnThisView) {
|
|
1501
|
+
final RenderNode node = hippyContext.getRenderManager().getRenderNode(view.getId());
|
|
1502
|
+
className = node.getClassName();
|
|
1503
|
+
}
|
|
1504
|
+
if (view != null && view.getId() != -1 && executeOnThisView) {
|
|
1505
|
+
final RenderNode node = hippyContext.getRenderManager().getRenderNode(view.getId());
|
|
1506
|
+
// Log.i(TAG,"dispatchFunctionBySid node class:"+className+",dispatchUIFunction");
|
|
1507
|
+
node.dispatchUIFunction(functionTargetName, params, takeOverPromise);
|
|
1508
|
+
} else if (target.getId() != -1) {
|
|
1509
|
+
final RenderNode node = hippyContext.getRenderManager().getRenderNode(target.getId());
|
|
1510
|
+
// Log.i(TAG,"dispatchFunctionBySid node class:"+className+",dispatchUIFunction");
|
|
1511
|
+
node.dispatchUIFunction(functionTargetName, params, takeOverPromise);
|
|
1512
|
+
}
|
|
1513
|
+
//final String className = TextUtils.isEmpty(targetNodeClassName) ? node.getClassName() : targetNodeClassName;
|
|
1514
|
+
Log.e(TAG, "dispatchFunctionBySid execute !!! view:" + ExtendUtil.debugViewLite(target) + ",className:" + className + ",functionTargetName:" + functionTargetName + ",array :" + params);
|
|
1515
|
+
if (className != null) {
|
|
1516
|
+
CustomControllerHelper.dispatchUIFunction(hippyContext.getRenderManager().mControllerManager, target, className, functionTargetName, params, takeOverPromise);
|
|
1517
|
+
} else {
|
|
1518
|
+
Log.e(TAG, "dispatchFunctionBySid error className null func:" + functionTargetName + ",sid:" + targetSID);
|
|
1519
|
+
if (takeOverPromise != null) {
|
|
1520
|
+
takeOverPromise.reject("dispatchFunctionBySid error on className is null ");
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
} else {
|
|
1524
|
+
Log.e(TAG, "dispatchFunctionBySid error on func:" + functionTargetName + ",sid:" + targetSID + ",context is not HippyInstanceContext context:" + context);
|
|
1525
|
+
}
|
|
1526
|
+
} else {
|
|
1527
|
+
if (takeOverPromise != null) {
|
|
1528
|
+
takeOverPromise.reject("dispatchFunctionBySid error on find target null");
|
|
1529
|
+
}
|
|
1530
|
+
Log.e(TAG, "dispatchFunctionBySid error on find target null func:" + functionTargetName + ",sid:" + targetSID);
|
|
1531
|
+
}
|
|
1532
|
+
} else {
|
|
1533
|
+
if (takeOverPromise != null) {
|
|
1534
|
+
takeOverPromise.reject("dispatchFunctionBySid error on find root null");
|
|
1535
|
+
}
|
|
1536
|
+
Log.e(TAG, "dispatchFunctionBySid error find root null func:" + functionTargetName + ",sid:" + targetSID);
|
|
1537
|
+
}
|
|
1538
|
+
} catch (Exception e) {
|
|
1539
|
+
Log.e(TAG, "dispatchFunctionBySid fatal error func:" + functionTargetName + ",sid:" + targetSID);
|
|
1540
|
+
e.printStackTrace();
|
|
1541
|
+
if (promise != null) {
|
|
1542
|
+
promise.reject("dispatchFunctionBySid fatal error");
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/***
|
|
1548
|
+
* dispatch the js call UI Function with Promise to call back.
|
|
1549
|
+
*
|
|
1550
|
+
* @param view view实例
|
|
1551
|
+
* @param functionName 函数名
|
|
1552
|
+
* @param params 函数参数
|
|
1553
|
+
* @param promise 回调
|
|
1554
|
+
*/
|
|
1555
|
+
public void dispatchFunction(T view, String functionName, HippyArray params, Promise promise) {
|
|
1556
|
+
// if(LogUtils.isDebug()) {
|
|
1557
|
+
Log.d(TAG, "dispatchFunction withPromise:" + functionName + ",data:" + params);
|
|
1558
|
+
Log.d(FastListView.TAG_CLONED, "dispatchFunction withPromise:" + functionName + ",data:" + params + ",view:" + view);
|
|
1559
|
+
// }
|
|
1560
|
+
if ("dispatchFunctionBySid".equals(functionName)) {
|
|
1561
|
+
Log.e(ReplaceChildView.TAG, "native call dispatchFunctionBySid with promise var" + params);
|
|
1562
|
+
}
|
|
1563
|
+
if (FastListViewController.dispatchFunctionByTemplate(this, view, functionName, params, promise)) {
|
|
1564
|
+
Log.e(ReplaceChildView.TAG, "native call dispatchFunctionBySid return on dispatchFunctionByTemplate");
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
switch (functionName) {
|
|
1568
|
+
case "hasFocus":
|
|
1569
|
+
if (view != null) {
|
|
1570
|
+
promise.resolve(view.hasFocus());
|
|
1571
|
+
}
|
|
1572
|
+
break;
|
|
1573
|
+
case "isFocused":
|
|
1574
|
+
if (view != null) {
|
|
1575
|
+
promise.resolve(view.isFocused());
|
|
1576
|
+
}
|
|
1577
|
+
break;
|
|
1578
|
+
case "setBackGroundColor":
|
|
1579
|
+
if (view != null) {
|
|
1580
|
+
try {
|
|
1581
|
+
setBackgroundString(view, params.getString(0));
|
|
1582
|
+
view.invalidate();
|
|
1583
|
+
} catch (Exception e) {
|
|
1584
|
+
if (LogUtils.isDebug()) {
|
|
1585
|
+
e.printStackTrace();
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
break;
|
|
1590
|
+
case "getLocationOnScreen":
|
|
1591
|
+
int[] outputBuffer = new int[2];
|
|
1592
|
+
view.getLocationOnScreen(outputBuffer);
|
|
1593
|
+
int width = view.getWidth();
|
|
1594
|
+
int height = view.getHeight();
|
|
1595
|
+
HippyMap map = new HippyMap();
|
|
1596
|
+
map.pushInt("left", outputBuffer[0]);
|
|
1597
|
+
map.pushInt("top", outputBuffer[1]);
|
|
1598
|
+
map.pushInt("right", outputBuffer[0] + width);
|
|
1599
|
+
map.pushInt("bottom", outputBuffer[1] + height);
|
|
1600
|
+
map.pushInt("width", width);
|
|
1601
|
+
map.pushInt("height", height);
|
|
1602
|
+
map.pushDouble("density", PixelUtil.getDensity());
|
|
1603
|
+
|
|
1604
|
+
HippyMap result = new HippyMap();
|
|
1605
|
+
result.pushInt("code", 0);
|
|
1606
|
+
result.pushObject("data", map);
|
|
1607
|
+
|
|
1608
|
+
promise.resolve(result);
|
|
1609
|
+
break;
|
|
1610
|
+
case "getViewState":
|
|
1611
|
+
promise.resolve(ExtendUtil.getViewState(view));
|
|
1612
|
+
break;
|
|
1613
|
+
case "getChildViewState":
|
|
1614
|
+
HippyMap stateMap = null;
|
|
1615
|
+
try {
|
|
1616
|
+
stateMap = ExtendUtil.getChildState(view, params.getInt(0));
|
|
1617
|
+
} catch (Exception e) {
|
|
1618
|
+
e.printStackTrace();
|
|
1619
|
+
}
|
|
1620
|
+
if (stateMap != null) {
|
|
1621
|
+
stateMap.pushBoolean("valid", true);
|
|
1622
|
+
} else {
|
|
1623
|
+
stateMap = new HippyMap();
|
|
1624
|
+
stateMap.pushBoolean("valid", false);
|
|
1625
|
+
}
|
|
1626
|
+
promise.resolve(stateMap);
|
|
1627
|
+
break;
|
|
1628
|
+
case "dispatchTVItemFunction":
|
|
1629
|
+
this.dispatchTVItemFunction(view, params, promise);
|
|
1630
|
+
break;
|
|
1631
|
+
case "dispatchFunctionBySid":
|
|
1632
|
+
dispatchFunctionBySid(view, params, promise);
|
|
1633
|
+
break;
|
|
1634
|
+
//2.11.x
|
|
1635
|
+
case "isInTouchMode":
|
|
1636
|
+
promise.resolve(view.isInTouchMode());
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
/***
|
|
1643
|
+
* batch complete
|
|
1644
|
+
*
|
|
1645
|
+
* @param view
|
|
1646
|
+
*/
|
|
1647
|
+
public void onBatchComplete(T view) {
|
|
1648
|
+
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
protected void deleteChild(ViewGroup parentView, View childView) {
|
|
1652
|
+
parentView.removeView(childView);
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
protected void deleteChild(ViewGroup parentView, View childView, int childIndex) {
|
|
1656
|
+
deleteChild(parentView, childView);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
//zhaopeng add
|
|
1660
|
+
public void onBeforeViewDestroy(T t) {
|
|
1661
|
+
final String type = findViewCacheType(t);
|
|
1662
|
+
if (LogUtils.isDebug()) {
|
|
1663
|
+
Log.d(TAG, "onBeforeViewDestroy t :" + t.getId() + ",cacheType:" + type);
|
|
1664
|
+
}
|
|
1665
|
+
if (!TextUtils.isEmpty(type) && cacheViewsPool != null) {
|
|
1666
|
+
cacheViewsPool.put(type, t);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
public void onViewDestroy(T t) {
|
|
1671
|
+
// add by weipeng
|
|
1672
|
+
// 自定义的组件为实现HippyViewBase接口,需要判断下
|
|
1673
|
+
if (t instanceof HippyViewBase) t.setGestureDispatcher(null);
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
protected void addView(ViewGroup parentView, View view, int index) {
|
|
1677
|
+
// TODO: 这里需要复现场景来解,先上一个临时方案
|
|
1678
|
+
int realIndex = index;
|
|
1679
|
+
if (realIndex > parentView.getChildCount()) {
|
|
1680
|
+
realIndex = parentView.getChildCount();
|
|
1681
|
+
}
|
|
1682
|
+
try {
|
|
1683
|
+
parentView.addView(view, realIndex);
|
|
1684
|
+
} catch (Exception e) {
|
|
1685
|
+
e.printStackTrace();
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
protected void onManageChildComplete(T view) {
|
|
1690
|
+
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
public int getChildCount(T viewGroup) {
|
|
1694
|
+
if (viewGroup instanceof ViewGroup) {
|
|
1695
|
+
return ((ViewGroup) viewGroup).getChildCount();
|
|
1696
|
+
}
|
|
1697
|
+
return 0;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
public View getChildAt(T viewGroup, int i) {
|
|
1701
|
+
if (viewGroup instanceof ViewGroup) {
|
|
1702
|
+
return ((ViewGroup) viewGroup).getChildAt(i);
|
|
1703
|
+
}
|
|
1704
|
+
return null;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* add by zhaopeng 20201110
|
|
1709
|
+
*/
|
|
1710
|
+
@HippyControllerProps(name = NodeProps.FOCUS_SCALE, defaultType = HippyControllerProps.NUMBER, defaultNumber = 1.1)
|
|
1711
|
+
public void setFocusScale(T view, float focusScale) {
|
|
1712
|
+
if (view instanceof HippyImageView) {
|
|
1713
|
+
((HippyImageView) view).setFocusScale(focusScale);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* add by zhaopeng 20201110
|
|
1719
|
+
*/
|
|
1720
|
+
@HippyControllerProps(name = NodeProps.CLIP_TO_PADDING, defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
|
|
1721
|
+
public void setClipToPadding(T view, boolean clip) {
|
|
1722
|
+
if (view instanceof ViewGroup) {
|
|
1723
|
+
((ViewGroup) view).setClipToPadding(clip);
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* add by zhaopeng 20201110
|
|
1730
|
+
*/
|
|
1731
|
+
@HippyControllerProps(name = NodeProps.CLIP_CHILDREN, defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
|
|
1732
|
+
public void setClip(T view, boolean clip) {
|
|
1733
|
+
if (view instanceof ViewGroup) {
|
|
1734
|
+
((ViewGroup) view).setClipChildren(clip);
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
@HippyControllerProps(name = NodeProps.CLIP_BOUNDS, defaultType = HippyControllerProps.MAP)
|
|
1739
|
+
public void setClipBounds(T view, HippyMap hippyMap) {
|
|
1740
|
+
//int left, int top, int right, int bottom
|
|
1741
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
|
1742
|
+
if (view != null) {
|
|
1743
|
+
Rect rect = new Rect(hippyMap.getInt("left"), hippyMap.getInt("top"), hippyMap.getInt("right"), hippyMap.getInt("bottom"));
|
|
1744
|
+
view.setClipBounds(rect);
|
|
1745
|
+
}
|
|
1746
|
+
} else {
|
|
1747
|
+
Log.e(TAG, "setClipBounds is'nt support under JELLY_BEAN_MR2");
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
@HippyControllerProps(name = NodeProps.LAYOUT_PADDING, defaultType = HippyControllerProps.MAP)
|
|
1753
|
+
public void setPadding(T view, HippyMap hippyMap) {
|
|
1754
|
+
if (view != null && hippyMap != null) {
|
|
1755
|
+
if (hippyMap.containsKey("all") && hippyMap.getInt("all") > 0) {
|
|
1756
|
+
final int all = Utils.toPX(hippyMap.getInt("all"));
|
|
1757
|
+
view.setPadding(all, all, all, all);
|
|
1758
|
+
} else {
|
|
1759
|
+
view.setPadding(hippyMap.containsKey("left") ? Utils.toPX(hippyMap.getInt("left")) : 0,
|
|
1760
|
+
hippyMap.containsKey("top") ? Utils.toPX(hippyMap.getInt("top")) : 0,
|
|
1761
|
+
hippyMap.containsKey("right") ? Utils.toPX(hippyMap.getInt("right")) : 0,
|
|
1762
|
+
hippyMap.containsKey("bottom") ? Utils.toPX(hippyMap.getInt("bottom")) : 0);
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* add by zhaopeng 20201110
|
|
1770
|
+
*/
|
|
1771
|
+
@HippyControllerProps(name = NodeProps.DESCENDANT_FOCUSABILITY, defaultType = HippyControllerProps.NUMBER, defaultNumber = -1)
|
|
1772
|
+
public void setDescendantFocusability(T view, int focusability) {
|
|
1773
|
+
LogUtils.d(FocusDispatchView.TAG, "setDescendantFocusability :" + focusability + " view:" + view);
|
|
1774
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, "setDescendantFocusability :" + focusability + " view:" + ExtendUtil.debugViewLite(view));
|
|
1775
|
+
if (view instanceof ViewGroup) {
|
|
1776
|
+
switch (focusability) {
|
|
1777
|
+
case 0:
|
|
1778
|
+
((ViewGroup) view).setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
|
|
1779
|
+
break;
|
|
1780
|
+
case 1:
|
|
1781
|
+
((ViewGroup) view).setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
|
|
1782
|
+
break;
|
|
1783
|
+
case 2:
|
|
1784
|
+
((ViewGroup) view).setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
|
1785
|
+
break;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
@HippyControllerProps(name = NodeProps.NEXT_FOCUS_NAME, defaultType = HippyControllerProps.MAP)
|
|
1792
|
+
public void steNextFocusName(T view, HippyMap hippyMap) {
|
|
1793
|
+
|
|
1794
|
+
FocusUtils.setNextFocusName(view, hippyMap);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
@HippyControllerProps(name = "bringFocusChildToFront", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
|
|
1799
|
+
public void setBringFocusChildToFront(T view, boolean enable) {
|
|
1800
|
+
if (view instanceof HippyViewGroup) {
|
|
1801
|
+
((HippyViewGroup) view).setBringFocusChildToFront(enable);
|
|
1802
|
+
} else if (view instanceof HippyListView) {
|
|
1803
|
+
((HippyListView) view).setBringToFrontOnFocus(enable);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
@HippyControllerProps(name = NodeProps.DUPLICATE_PARENT_STATE, defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
1808
|
+
public void setDuplicateParentStateEnabled(T view, boolean enable) {
|
|
1809
|
+
view.setDuplicateParentStateEnabled(enable);
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
@HippyControllerProps(name = "focusScaleDuplicateParentState", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
1813
|
+
public void setFocusScaleOnDuplicateParentState(T view, boolean enable) {
|
|
1814
|
+
if (view instanceof HippyImageView) {
|
|
1815
|
+
((HippyImageView) view).setFocusScaleOnDuplicateParentState(enable);
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
@HippyControllerProps(name = NodeProps.DUPLICATE_PARENT_STATE)
|
|
1820
|
+
public void setDuplicateParentStateEnabled(T view) {
|
|
1821
|
+
view.setDuplicateParentStateEnabled(true);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
@HippyControllerProps(name = "dispatchChildFocusEvent", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = true)
|
|
1826
|
+
public void setDispatchChildFocusEvent(T view, boolean enable) {
|
|
1827
|
+
if (view instanceof ExtendViewGroup) {
|
|
1828
|
+
((ExtendViewGroup) view).setDispatchChildFocusEvent(enable);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
@Deprecated
|
|
1833
|
+
@HippyControllerProps(name = "blockRootFocus", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
1834
|
+
public void setBlockRoot(T view, boolean enable) {
|
|
1835
|
+
if (view != null && view.getRootView() instanceof ViewGroup) {
|
|
1836
|
+
LogUtils.d(FocusDispatchView.TAG, "blockRootFocus called by view:" + view + ",enable:" + enable);
|
|
1837
|
+
LogAdapterUtils.log(view.getContext(), FocusDispatchView.TAG, "blockRootFocus called enable:" + enable + " view:" + ExtendUtil.debugViewLite(view));
|
|
1838
|
+
((ViewGroup) view.getRootView()).setDescendantFocusability(enable ? ViewGroup.FOCUS_BLOCK_DESCENDANTS : ViewGroup.FOCUS_BEFORE_DESCENDANTS);
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
@HippyControllerProps(name = NodeProps.FOCUS_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
1843
|
+
public void setFocusColor(T view, int color) {
|
|
1844
|
+
if (view instanceof HippyTextView) {
|
|
1845
|
+
((HippyTextView) view).setFocusColor(color);
|
|
1846
|
+
}
|
|
1847
|
+
if (view instanceof TVTextView) {
|
|
1848
|
+
((TVTextView) view).setFocusColor(color);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
@HippyControllerProps(name = NodeProps.SELECT_COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
1854
|
+
public void selectColor(T view, int color) {
|
|
1855
|
+
if (view instanceof HippyTextView) {
|
|
1856
|
+
((HippyTextView) view).setSelectColor(color);
|
|
1857
|
+
}
|
|
1858
|
+
if (view instanceof TVTextView) {
|
|
1859
|
+
((TVTextView) view).setSelectColor(color);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
@HippyControllerProps(name = NodeProps.COLOR, defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
|
|
1865
|
+
public void setColor(T view, int color) {
|
|
1866
|
+
if (view instanceof HippyTextView) {
|
|
1867
|
+
((HippyTextView) view).setCustomColor(color);
|
|
1868
|
+
}
|
|
1869
|
+
if (view instanceof TVTextView) {
|
|
1870
|
+
((TVTextView) view).setTextColor(color);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
//此处vue是怎么传值的
|
|
1875
|
+
@Deprecated
|
|
1876
|
+
@HippyControllerProps(name = NodeProps.BLOCK_FOCUS_DIRECTIONS, defaultType = HippyControllerProps.ARRAY)
|
|
1877
|
+
public void setBlockFocusDirectionsOnFail(T view, HippyArray array) {
|
|
1878
|
+
if (view == null || array == null) {
|
|
1879
|
+
Log.e(TAG, "setBlockFocusDirectionsOnFail error array is null");
|
|
1880
|
+
return;
|
|
1881
|
+
}
|
|
1882
|
+
if (view instanceof TVSingleLineListView) {
|
|
1883
|
+
int[] directions = new int[array.size()];
|
|
1884
|
+
for (int i = 0; i < array.size(); i++) {
|
|
1885
|
+
switch (array.getString(i)) {
|
|
1886
|
+
case "up":
|
|
1887
|
+
directions[i] = View.FOCUS_UP;
|
|
1888
|
+
break;
|
|
1889
|
+
case "down":
|
|
1890
|
+
directions[i] = View.FOCUS_DOWN;
|
|
1891
|
+
break;
|
|
1892
|
+
case "left":
|
|
1893
|
+
directions[i] = View.FOCUS_LEFT;
|
|
1894
|
+
break;
|
|
1895
|
+
case "right":
|
|
1896
|
+
directions[i] = View.FOCUS_RIGHT;
|
|
1897
|
+
break;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
((TVSingleLineListView) view).setBlockFocusOnFail(directions);
|
|
1901
|
+
} else {
|
|
1902
|
+
if (array.size() == 0) {
|
|
1903
|
+
view.setNextFocusUpId(View.NO_ID);
|
|
1904
|
+
view.setNextFocusDownId(View.NO_ID);
|
|
1905
|
+
view.setNextFocusLeftId(View.NO_ID);
|
|
1906
|
+
view.setNextFocusRightId(View.NO_ID);
|
|
1907
|
+
return;
|
|
1908
|
+
}
|
|
1909
|
+
int nextID = view.getId();
|
|
1910
|
+
for (int i = 0; i < array.size(); i++) {
|
|
1911
|
+
switch (array.getString(i)) {
|
|
1912
|
+
case "up":
|
|
1913
|
+
view.setNextFocusUpId(nextID);
|
|
1914
|
+
break;
|
|
1915
|
+
case "down":
|
|
1916
|
+
view.setNextFocusDownId(nextID);
|
|
1917
|
+
break;
|
|
1918
|
+
case "left":
|
|
1919
|
+
view.setNextFocusLeftId(nextID);
|
|
1920
|
+
break;
|
|
1921
|
+
case "right":
|
|
1922
|
+
view.setNextFocusRightId(nextID);
|
|
1923
|
+
break;
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
@HippyControllerProps(name = "selected", defaultType = HippyControllerProps.BOOLEAN)
|
|
1930
|
+
public void setSelected(T view, boolean selected) {
|
|
1931
|
+
view.setSelected(selected);
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
@HippyControllerProps(name = "selectState", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
1935
|
+
public void setSelectState(T view, boolean selected) {
|
|
1936
|
+
if (view instanceof HippyTextView) {
|
|
1937
|
+
((HippyTextView) view).setSelectState(selected);
|
|
1938
|
+
} else if (view instanceof HippyImageView) {
|
|
1939
|
+
((HippyImageView) view).setSelectState(selected);
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
@HippyControllerProps(name = "layoutAfterAttach", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
1945
|
+
public void setRelayoutAfterAttach(T view, boolean relayoutAfterAttach) {
|
|
1946
|
+
if (view instanceof HippyImageView) {
|
|
1947
|
+
((HippyImageView) view).setRelayoutAfterAttach(relayoutAfterAttach);
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
@HippyControllerProps(name = "cacheType", defaultType = HippyControllerProps.STRING)
|
|
1952
|
+
public void setCacheType(T view, String cacheType) {
|
|
1953
|
+
// if(view instanceof HippyImageView){
|
|
1954
|
+
// ((HippyImageView) view).setRelayoutAfterAttach(relayoutAfterAttach);
|
|
1955
|
+
// }
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
@HippyControllerProps(name = "cacheMax", defaultType = HippyControllerProps.ARRAY)
|
|
1959
|
+
public void setCacheMax(T view, HippyArray cache) {
|
|
1960
|
+
// if(view instanceof HippyImageView){
|
|
1961
|
+
// ((HippyImageView) view).setRelayoutAfterAttach(relayoutAfterAttach);
|
|
1962
|
+
// }
|
|
1963
|
+
if (cache != null && cacheViewsPool != null) {
|
|
1964
|
+
cacheViewsPool.setMaxCacheSize(cache.getString(0), cache.getInt(1));
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
@HippyControllerProps(name = "recycleOnDetach", defaultType = HippyControllerProps.BOOLEAN)
|
|
1969
|
+
public void setRecycleOnDetach(T view, boolean recycleOnDetach) {
|
|
1970
|
+
if (view instanceof AsyncImageView) {
|
|
1971
|
+
((AsyncImageView) view).setRecycleOnDetach(recycleOnDetach);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
@HippyControllerProps(name = "visible", defaultType = HippyControllerProps.BOOLEAN, defaultBoolean = false)
|
|
1976
|
+
public void setVisible(T view, boolean visible) {
|
|
1977
|
+
|
|
1978
|
+
view.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
@HippyControllerProps(name = "visibility", defaultType = HippyControllerProps.STRING)
|
|
1982
|
+
public void setVisibility(T view, String visibility) {
|
|
1983
|
+
switch (visibility) {
|
|
1984
|
+
case "visible":
|
|
1985
|
+
view.setVisibility(View.VISIBLE);
|
|
1986
|
+
break;
|
|
1987
|
+
case "invisible":
|
|
1988
|
+
view.setVisibility(View.INVISIBLE);
|
|
1989
|
+
break;
|
|
1990
|
+
case "gone":
|
|
1991
|
+
view.setVisibility(View.GONE);
|
|
1992
|
+
break;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
@HippyControllerProps(name = "viewLayerType", defaultType = HippyControllerProps.STRING)
|
|
1998
|
+
public void setLayerType(T view, String type) {
|
|
1999
|
+
switch (type) {
|
|
2000
|
+
case "hardware":
|
|
2001
|
+
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
|
2002
|
+
break;
|
|
2003
|
+
case "soft":
|
|
2004
|
+
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
|
2005
|
+
break;
|
|
2006
|
+
case "none":
|
|
2007
|
+
view.setLayerType(View.LAYER_TYPE_NONE, null);
|
|
2008
|
+
break;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
protected String getInnerPath(HippyInstanceContext context, String path) {
|
|
2015
|
+
//hpfile://./assets/file_banner02.jpg
|
|
2016
|
+
if (path != null && path.startsWith("hpfile://")) {
|
|
2017
|
+
String relativePath = path.replace("hpfile://./", "");
|
|
2018
|
+
//hippysdk的图片加载协议
|
|
2019
|
+
String bundlePath = null;
|
|
2020
|
+
if (context.getBundleLoader() != null) {
|
|
2021
|
+
bundlePath = context.getBundleLoader().getPath();
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
path = bundlePath == null ? null
|
|
2025
|
+
: bundlePath.subSequence(0, bundlePath.lastIndexOf(File.separator) + 1) + relativePath;
|
|
2026
|
+
//assets://index.android.jsbundle
|
|
2027
|
+
//file:sdcard/hippy/feeds/index.android.jsbundle
|
|
2028
|
+
}
|
|
2029
|
+
return path;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
public static class CacheMap {
|
|
2033
|
+
Map<String, CacheViewList> map = new HashMap<>();
|
|
2034
|
+
|
|
2035
|
+
View get(String type) {
|
|
2036
|
+
if (map.containsKey(type)) {
|
|
2037
|
+
return map.get(type).get();
|
|
2038
|
+
}
|
|
2039
|
+
return null;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
public void setMaxCacheSize(String type, int max) {
|
|
2043
|
+
if (!TextUtils.isEmpty(type)) {
|
|
2044
|
+
if (map.containsKey(type)) {
|
|
2045
|
+
map.get(type).setMaxCacheSize(max);
|
|
2046
|
+
} else {
|
|
2047
|
+
final CacheViewList c = new CacheViewList(type);
|
|
2048
|
+
c.setMaxCacheSize(max);
|
|
2049
|
+
map.put(type, c);
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
void put(String type, View view) {
|
|
2055
|
+
if (view != null && !TextUtils.isEmpty(type)) {
|
|
2056
|
+
if (map.containsKey(type)) {
|
|
2057
|
+
map.get(type).put(view);
|
|
2058
|
+
} else {
|
|
2059
|
+
final CacheViewList c = new CacheViewList(type);
|
|
2060
|
+
c.put(view);
|
|
2061
|
+
map.put(type, c);
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
@HippyControllerProps(name = "visible", defaultType = HippyControllerProps.BOOLEAN)
|
|
2069
|
+
public void setVisibleCompat(T view, boolean b) {
|
|
2070
|
+
//zhaopeng 2022 0908 兼容方法,勿删除
|
|
2071
|
+
this.setVisible(view, b);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
private static class CacheViewList {
|
|
2075
|
+
final String type;
|
|
2076
|
+
CacheList list;
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
private CacheViewList(String type) {
|
|
2080
|
+
this.type = type;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
public void setMaxCacheSize(int max) {
|
|
2085
|
+
if (list == null) {
|
|
2086
|
+
list = new CacheList();
|
|
2087
|
+
}
|
|
2088
|
+
list.max = max;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
void put(View view) {
|
|
2092
|
+
if (list == null) {
|
|
2093
|
+
list = new CacheList();
|
|
2094
|
+
}
|
|
2095
|
+
final boolean add = list.add(view);
|
|
2096
|
+
if (add) {
|
|
2097
|
+
if (LogUtils.isDebug()) {
|
|
2098
|
+
Log.d(TAG, "+++CacheViewList put size:" + list.size() + ",type:" + type);
|
|
2099
|
+
}
|
|
2100
|
+
} else {
|
|
2101
|
+
if (LogUtils.isDebug()) {
|
|
2102
|
+
Log.e(TAG, "+++CacheViewList put max items " + ",type:" + type);
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
View get() {
|
|
2108
|
+
if (list != null && list.size() > 0) {
|
|
2109
|
+
if (LogUtils.isDebug()) {
|
|
2110
|
+
Log.d(TAG, "---CacheViewList popup size:" + list.size() + ",type:" + type);
|
|
2111
|
+
}
|
|
2112
|
+
return list.get();
|
|
2113
|
+
}
|
|
2114
|
+
return null;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
public static class CacheList {
|
|
2119
|
+
int max = 20;
|
|
2120
|
+
List<View> list;
|
|
2121
|
+
|
|
2122
|
+
boolean add(View view) {
|
|
2123
|
+
if (list == null) {
|
|
2124
|
+
list = new ArrayList<>();
|
|
2125
|
+
}
|
|
2126
|
+
if (size() < max) {
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
final boolean b = list.add(view);
|
|
2130
|
+
if (b) {
|
|
2131
|
+
if (view instanceof HippyRecycler) {
|
|
2132
|
+
((HippyRecycler) view).onResetBeforeCache();
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
return b;
|
|
2136
|
+
} else {
|
|
2137
|
+
return false;
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
View get() {
|
|
2142
|
+
if (list != null && list.size() > 0) {
|
|
2143
|
+
return list.remove(0);
|
|
2144
|
+
}
|
|
2145
|
+
return null;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
int size() {
|
|
2149
|
+
return list.size();
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
public static String findViewCacheType(View v) {
|
|
2155
|
+
if (v.getTag() != null && v.getTag() instanceof HippyMap) {
|
|
2156
|
+
return ((HippyMap) v.getTag()).getString(HippyTag.TAG_CLASS_CACHE);
|
|
2157
|
+
}
|
|
2158
|
+
return null;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* transform
|
|
2163
|
+
**/
|
|
2164
|
+
@HippyControllerProps(name = "translation", defaultType = HippyControllerProps.ARRAY)
|
|
2165
|
+
public void setTranslate(View view, HippyArray pos) {
|
|
2166
|
+
Log.d(TAG, "translation pos:" + pos + ",view :" + view);
|
|
2167
|
+
if (pos != null) {
|
|
2168
|
+
final int x = Utils.toPX(pos.getInt(0));
|
|
2169
|
+
final int y = Utils.toPX(pos.getInt(1));
|
|
2170
|
+
view.layout(x, y, x + view.getWidth(), y + view.getHeight());
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
/**
|
|
2175
|
+
* transform
|
|
2176
|
+
**/
|
|
2177
|
+
@HippyControllerProps(name = "size", defaultType = HippyControllerProps.ARRAY)
|
|
2178
|
+
public void setSize(View view, HippyArray size) {
|
|
2179
|
+
Log.d(TAG, "setSize size:" + size + ",view :" + view);
|
|
2180
|
+
if (size != null) {
|
|
2181
|
+
final int x = Utils.toPX((int) view.getX());
|
|
2182
|
+
final int y = Utils.toPX((int) view.getY());
|
|
2183
|
+
final int width = Utils.toPX(size.getInt(0));
|
|
2184
|
+
final int height = Utils.toPX(size.getInt(1));
|
|
2185
|
+
view.layout(x, y, x + view.getWidth(), y + view.getHeight());
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
}
|