00001. "forms": [ 00002. { 00003. "name": "Form_JS_DEMO", 00004. "description": "it is js form", 00005. "type": "JS", 00006. "jsComponentName": "card", 00007. "colorMode": "auto", 00008. "isDefault": true, 00009. "updateEnabled": true, 00010. "scheduledUpdateTime": "10:30", 00011. "defaultDimension": "2*2", 00012. "supportDimensions": [ 00013. "2*2", 00014. "2*4" 00015. ], 00016. "metaData": { 00017. "customizeData": [ 00018. { 00019. "name": "needBlurBackgroundForLauncher", 00020. "value": "true" 00021. } 00022. ] 00023. } 00024. } |
00001. protected ProviderFormInfo onCreateForm(Intent intent) { 00002. ...... 00003. // 1. 获取自定义数据 00004. IntentParams intentParams = intent.getParam(AbilitySlice.PARAM_FORM_CUSTOMIZE_KEY); 00005. 00006. // 2. 从intentParams中获取是否支持背景模糊 00007. boolean isSupport = (boolean) intentParams.getParam("fa_card_background_blur_support"); 00008. ...... 00009. } |