女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

HarmonyOS開發(fā)案例:【UIAbility內(nèi)和UIAbility間頁面的跳轉(zhuǎn)】

jf_46214456 ? 來源:jf_46214456 ? 作者:jf_46214456 ? 2024-05-09 15:06 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

UIAbility內(nèi)和UIAbility間頁面的跳轉(zhuǎn)(ArkTS)

介紹

基于Stage模型下的UIAbility開發(fā),實現(xiàn)UIAbility內(nèi)和UIAbility間頁面的跳轉(zhuǎn)。包含如下功能:

  1. UIAbility內(nèi)頁面的跳轉(zhuǎn)。
  2. 跳轉(zhuǎn)到指定UIAbility的首頁。
  3. 跳轉(zhuǎn)到指定UIAbility的指定頁面(非首頁)。

最終效果圖如下:

相關(guān)概念

  • [UIAbility組件概述]:UIAbility組件是一種包含UI界面的應(yīng)用組件,主要用于和用戶交互。UIAbility組件是系統(tǒng)調(diào)度的基本單元,為應(yīng)用提供繪制界面的窗口。一個應(yīng)用可以包含一個或多個UIAbility組件。
  • [UIAbilityContext]:UIAbilityContext是[UIAbility]的上下文環(huán)境,繼承自[Context],提供UIAbility的相關(guān)配置信息以及操作UIAbility和ServiceExtensionAbility的方法。
  • [頁面路由]:提供通過不同的url訪問不同的頁面,包括跳轉(zhuǎn)到應(yīng)用內(nèi)的指定頁面、用應(yīng)用內(nèi)的某個頁面替換當(dāng)前頁面、返回上一頁面或指定的頁面等。
  • [Text]:文本組件,用于呈現(xiàn)一段文本信息。
  • [Button]:按鈕組件,可快速創(chuàng)建不同樣式的按鈕。

環(huán)境搭建

軟件要求

  • [DevEco Studio]版本:DevEco Studio 3.1 Release。
  • OpenHarmony SDK版本:API version 9。

硬件要求

  • 開發(fā)板類型:[潤和RK3568開發(fā)板]。
  • OpenHarmony系統(tǒng):3.2 Release。

環(huán)境搭建

完成本篇Codelab我們首先要完成開發(fā)環(huán)境的搭建,本示例以RK3568開發(fā)板為例,參照以下步驟進行:

  1. [獲取OpenHarmony系統(tǒng)版本]:標準系統(tǒng)解決方案(二進制)。以3.2 Release版本為例:
  2. 搭建燒錄環(huán)境。
    1. [完成DevEco Device Tool的安裝]
    2. [完成RK3568開發(fā)板的燒錄]
  3. 搭建開發(fā)環(huán)境。
    1. 開始前請參考[工具準備],完成DevEco Studio的安裝和開發(fā)環(huán)境配置。
    2. 開發(fā)環(huán)境配置完成后,請參考[使用工程向?qū)創(chuàng)建工程(模板選擇“Empty Ability”)。
    3. 工程創(chuàng)建完成后,選擇使用[真機進行調(diào)測]。
    4. 開發(fā)前請熟悉鴻蒙開發(fā)指導(dǎo)文檔:[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md]

代碼結(jié)構(gòu)解讀

本篇Codelab只對核心代碼進行講解,完整代碼可以直接從gitee獲取。

├──device/src/main/ets              // device模塊的代碼區(qū)
│  ├──pages
│  │  ├──Index.ets                  // SecondAbility的Index頁面
│  │  └──Second.ets                 // SecondAbility的Second頁面
│  ├──secondability
│  │  └──SecondAbility.ets          // 程序入口類
├──device/src/main/resources        // device模塊的資源文件目錄
├──entry/src/main/ets               // entry模塊的代碼區(qū)
│  ├──common
│  │  ├──constants
│  │  │  ├──CommonConstants.ets     // 公共常量類
│  │  │  └──StyleConstants.ets	    // 樣式常量類
│  │  ├──utils
│  │  │  ├──GlobalContext.ets       // 全局變量控制類
│  │  │  └──Logger.ets	            // 日志打印類
│  ├──entryability
│  │  └──EntryAbility.ts            // 程序入口類
│  ├──model
│  │  └──ButtonClickMethod.ets      // 按鈕點擊后調(diào)用的方法類
│  ├──pages
│  │  ├──Index.ets                  // EntryAbility的Index頁面
│  │  └──Second.ets                 // EntryAbility的Second頁面
└──entry/src/main/resources         // entry模塊的資源文件目錄

`HarmonyOSOpenHarmony鴻蒙文檔籽料:mau123789v直接拿`

搜狗高速瀏覽器截圖20240326151450.png

UIAbility內(nèi)頁面的跳轉(zhuǎn)

entry模塊中,EntryAbility內(nèi)頁面的跳轉(zhuǎn)可以通過頁面路由router來實現(xiàn)。頁面路由router根據(jù)頁面url找到目標頁面,從而實現(xiàn)跳轉(zhuǎn)。效果圖如下:

  1. 實現(xiàn)UIAbility內(nèi)頁面的跳轉(zhuǎn),我們首先需要構(gòu)建兩個頁面。在“Project”窗口,點擊“entry > src > main > ets > pages”,打開“Index.ets”文件,可以看到EntryAbility的Index頁面由一個Image組件、兩個Text組件、三個Button組件組成。“Index.ets”文件的示例代碼如下:

    @Entry
    @Component
    struct Index {
      @State text: string = '';
      @State bottomMargin: string = StyleConstants.MAIN_INDEX_BUTTON_MARGIN_BOTTOM;
    
      build() {
        Column() {
          Image($r('app.media.right'))
            ...
    
          Text($r('app.string.main_index_page_name'))
            ...
    
          // 條件渲染:當(dāng)text的值不為空時,顯示該組件
          if (this.text !== '') {
            Text(this.text)
              ...
          }
    
          // 導(dǎo)航到EntryAbility的Second Page
          Button($r('app.string.to_main_second_page_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
    
          // 導(dǎo)航到SecondAbility的Index Page
          Button($r('app.string.to_second_index_page_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
    
          // 導(dǎo)航到SecondAbility的Second Page
          Button($r('app.string.to_second_second_page_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
        }
        ...
      }
    }
    
  2. 在“Project”窗口,打開“entry > src > main > ets”,右鍵點擊“pages”文件夾,選擇“New > Page”,命名為“Second”。可以看到EntryAbility的Second頁面由一個Image組件、兩個Text組件、一個Button組件組成。“Second.ets”文件的示例代碼如下:

    @Entry
    @Component
    struct Second {
      ...
    
      build() {
        Column() {
          Image($r('app.media.left'))
            ...
    
          Text($r('app.string.main_second_page_name'))
            ...
    
          Text(`${this.src}:${this.count}`)
            ...
    
          // 返回到EntryAbility的Index Page
          Button($r('app.string.back_main_index_page_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
        }
        ...
      }
    }
    
  3. 從entry模塊的Index頁面跳轉(zhuǎn)到Second頁面,并進行數(shù)據(jù)傳遞,通過頁面路由router來實現(xiàn)。需要如下幾個步驟:

    • 給兩個頁面導(dǎo)入router模塊。
    • 在EntryAbility的Index頁面中,點擊“導(dǎo)航到EntryAbility的Second Page”按鈕后,調(diào)用ButtonClickMethod類中的toEntryAbilitySecond方法,跳轉(zhuǎn)到EntryAbility的Second頁面。使用router.pushUrl實現(xiàn)跳轉(zhuǎn),可以通過params來向新頁面?zhèn)魅雲(yún)?shù),示例代碼如下:
    // 導(dǎo)入router模塊
    import router from '@ohos.router';
    
    // 導(dǎo)航到EntryAbility的Second Page
    toEntryAbilitySecond() {
      router.pushUrl({
        url: 'pages/Second',
        params: {
          src: textMessage,
          count: CommonConstants.NUM_VALUES[0]
        }
      });
    }
    
    • Second頁面通過router.getParams()方法獲取Index頁面?zhèn)鬟f過來的自定義參數(shù),并用一個Text文本展示從Index頁面?zhèn)鬟f過來的數(shù)據(jù),示例代碼如下:
    @Entry
    @Component
    struct Second {
      ...
      // 獲取Index頁面?zhèn)鬟f過來的自定義參數(shù)
      params = router?.getParams();
      @State src: string = this.params == undefined ? '-' : (this.params as Record< string,Object >)['src'] as string;
      @State count: number = this.params == undefined ? 0 : (this.params as Record< string,Object >)['count'] as number;
    
      build() {
        Column() {
          Image($r('app.media.left'))
            ...
    
          Text($r('app.string.main_second_page_name'))
            ...
    
          // 用一個Text文本展示從Index頁面?zhèn)鬟f過來的數(shù)據(jù)      
          Text(`${this.src}${this.count}`)
            ...
    
          // 返回到EntryAbility的Index Page
          Button($r('app.string.back_main_index_page_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
        }
        ...
      }
    }
    
  4. 從entry模塊的Second返回到Index頁面,使用router.back來實現(xiàn)。在EntryAbility的Second頁面中,點擊“返回到EntryAbility的Index Page”按鈕后,返回到EntryAbility的Index頁面,示例代碼如下:

    // 返回到EntryAbility的Index Page
    router.back();
    

跳轉(zhuǎn)到指定UIAbility的首頁

實現(xiàn)UIAbility間頁面的跳轉(zhuǎn),需要啟動另外一個UIAbility,可以通過UIAbilityContext的startAbility的方法來完成。本篇Codelab是用兩個模塊(entry和device),實現(xiàn)UIAbility間頁面的跳轉(zhuǎn)。跳轉(zhuǎn)到指定UIAbility的首頁,效果圖如下:

  1. 在本章節(jié)中,實現(xiàn)跳轉(zhuǎn)到指定UIAbility的首頁,我們需要新建一個模塊。在“Project”窗口,右鍵點擊“entry 文件夾”,選擇“New > Module > Empty Ability > Next”,在“Module name”中給新建的模塊命名為“device”,點擊“Next”,在“Ability name”中給新建模塊的Ability命名為“SecondAbility”,點擊“Finish”。可以看到文件目錄結(jié)構(gòu)如下:
  2. 構(gòu)建SecondAbility的首頁。在“Project”窗口,點擊“device > src > main > ets > pages”,打開“Index.ets”文件,可以看到SecondAbility的Index頁面由一個Image組件、兩個Text組件、一個Button組件組成。“Index.ets”文件的示例代碼如下:
    @Entry
    @Component
    struct Index {
      ...
    
      build() {
        Column() {
          Image($r('app.media.left'))
            ...
    
          Text($r('app.string.second_index_page_name'))
            ...
    
          Text(`${this.src}:${this.count}`)
            ...
    
          // 停止SecondAbility自身
          Button($r('app.string.terminate_second_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
        }
        ...
      }
    }
    
  3. 從entry模塊的EntryAbility的首頁,跳轉(zhuǎn)到SecondAbility的首頁,即從EntryAbility的Index頁面跳轉(zhuǎn)到SecondAbility的Index頁面。通過UIAbilityContext的startAbility方法來實現(xiàn)。
    • 首先需要在EntryAbility的“Index.ets”文件中獲取UIAbilityContext,示例代碼如下:

      // 獲取UIAbilityContext
      let context = getContext(this) as common.UIAbilityContext;
      

      說明: 如果需要使用UIAbilityContext中的方法,需要在對應(yīng)的頁面獲取相應(yīng)的UIAbilityContext。

    • 在EntryAbility的Index頁面中,點擊“導(dǎo)航到SecondAbility的Index Page”按鈕后,調(diào)用ButtonClickMethod類中的toSecondAbilityIndex方法,拉起SecondAbility的Index頁面。使用UIAbilityContext.startAbility來實現(xiàn),可以通過parameters來向被拉起方傳遞參數(shù),示例代碼如下:

      // 導(dǎo)航到SecondAbility的Index Page
      toSecondAbilityIndex(context: common.UIAbilityContext) {
        let want: Want = {
          'deviceId': '',
          'bundleName': CommonConstants.BUNDLE_NAME,
          'abilityName': CommonConstants.SECOND_ABILITY_NAME,
          'moduleName': CommonConstants.DEVICE_MODULE_NAME,
          'parameters': {
             src: textMessage,
             count: CommonConstants.NUM_VALUES[1]
           }
        };
        context.startAbility(want).then(() = > {
          Logger.info(CommonConstants.TAG, `start second ability index page succeed with ${JSON.stringify(want)}`);
        }).catch((error: Error) = > {
          Logger.error(CommonConstants.TAG, `start second ability index page failedwith ${error}`);
        });
      }
      
    • 在SecondAbility的Index頁面,獲取從EntryAbility的Index頁面?zhèn)鬟f過來的自定義參數(shù),并用一個Text文本展示從Index頁面?zhèn)鬟f過來的數(shù)據(jù),示例代碼如下:

      @Entry
      @Component
      struct Index {
        // 獲取從EntryAbility的Index頁面?zhèn)鬟f過來的自定義參數(shù)
        secondAbilityWant?: Want = GlobalContext.getContext().getObject('secondAbilityWant');
        @State src: string = this.secondAbilityWant?.parameters?.src as string ?? '-';
        @State count: number = this.secondAbilityWant?.parameters?.count as number ?? 0;
      
        build() {
          Column() {
            Image($r('app.media.left'))
              ...
      
            Text($r('app.string.second_index_page_name'))
              ...
      
            // 用一個Text文本展示從Index頁面?zhèn)鬟f過來的數(shù)據(jù)
            Text(`${this.src}${this.count}`)
              ...
      
            // 停止SecondAbility自身
            Button($r('app.string.terminate_second_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
              ...
          }
          ...
        }
      }
      
  4. 在SecondAbility的Index頁面,點擊“停止SecondAbility自身”按鈕,使用UIAbilityContext.terminateSelf方法手動銷毀Ability。示例代碼如下:
    // 停止SecondAbility自身
    terminateSecondAbility(context: common.UIAbilityContext) {
      context.terminateSelf().then(() = > {
        Logger.info(CommonConstants.TAG, 'terminate second ability self succeed');
      }).catch((error: Error) = > {
        Logger.error(CommonConstants.TAG, `terminate second ability self failed with ${error}`);
      });
    }
    
  5. 運行時,需要在DevEco Studio的entry模塊中勾選“Deploy Multi Hap Packages”,如下圖所示:

跳轉(zhuǎn)到指定UIAbility的指定頁面(非首頁)

跳轉(zhuǎn)到指定UIAbility的指定頁面(非首頁),本章節(jié)以從EntryAbility的Index頁面跳轉(zhuǎn)到SecondAbility的Second頁面為例。只需要在本文檔“跳轉(zhuǎn)到指定UIAbility的首頁”章節(jié)的基礎(chǔ)上,另外在device模塊中構(gòu)建一個Second頁面。效果圖如下:

  1. 構(gòu)建SecondAbility的Second頁面。在“Project”窗口,打開“device > src > main > ets”,右鍵點擊“pages”文件夾,選擇“New > Page”,命名為“Second”。可以看到文件目錄結(jié)構(gòu)如下:
  2. 可以看到SecondAbility的Second頁面由一個Image組件、兩個Text組件、一個Button組件組成。“Second.ets”文件的示例代碼如下:
    @Entry
    @Component
    struct Second {
      // 用來接收parameters參數(shù)傳過來的值
      secondAbilityWant?: Want = GlobalContext.getContext().getObject('secondAbilityWant');
      @State src: string = this.secondAbilityWant?.parameters?.src as string ?? '-';
      @State count: number = this.secondAbilityWant?.parameters?.count as number ?? 0;
    
      build() {
        Column() {
          Image($r('app.media.left'))
            ...
    
          Text($r('app.string.second_second_page_name'))
            ...
    
          Text(`${this.src}${this.count}`)
            ...
    
          // 停止SecondAbility自身并返回結(jié)果
          Button($r('app.string.terminate_second_for_result_btn_text'), { type: ButtonType.Capsule, stateEffect: true })
            ...
        }
        ...
      }
    }
    
  3. 在EntryAbility的Index頁面中,點擊“導(dǎo)航到SecondAbility的Second Page”按鈕后,調(diào)用ButtonClickMethod類中的toSecondAbilitySecond方法,拉起SecondAbility的Second頁面。
    • 使用UIAbilityContext.startAbilityForResult來實現(xiàn),并獲取被拉起側(cè)銷毀后的返回結(jié)果。可以通過parameters來向被拉起方傳遞參數(shù),示例代碼如下:
      // 導(dǎo)航到SecondAbility的Second Page
      toSecondAbilitySecond(context: common.UIAbilityContext, callback: (abilityResult: common.AbilityResult) = > void) {
        let want: Want = {
          'deviceId': '',
          'bundleName': CommonConstants.BUNDLE_NAME,
          'abilityName': CommonConstants.SECOND_ABILITY_NAME,
          'moduleName': CommonConstants.DEVICE_MODULE_NAME,
          'parameters': {
             url: 'pages/Second',
             src: textMessage,
             count: CommonConstants.NUM_VALUES[2]
           }
        };
      
        // 被拉起側(cè)銷毀后,在startAbilityForResult回調(diào)中可以獲取到被拉起側(cè)銷毀時傳遞過來的AbilityResult
        context.startAbilityForResult(want).then((result) = > {
          callback(result);
          Logger.info(CommonConstants.TAG, `start second ability second page succeed with ${JSON.stringify(want)}`);
        }).catch((error: Error) = > {
          Logger.error(CommonConstants.TAG, `start second ability second page failed with ${error}`);
        });
      }
      
    • 在“Project”窗口,點擊“device > src > main > ets > SecondAbility”,打開“SecondAbility.ets”文件,在onWindowStageCreate的生命周期回調(diào)函數(shù)中獲取拉起方的意圖,展示SecondAbility的指定頁面到界面。示例代碼如下:
      onWindowStageCreate(windowStage: Window.WindowStage) {
        ...
        let parameters: Record< string, Object > = (GlobalContext.getContext().getObject('secondAbilityWant') as Want)?.parameters as Record< string, Object >;
        let url = parameters?.url ?
          parameters.url as string : 'pages/Index';
        windowStage.loadContent(url, (err, data) = > {
          ...
        });
      }
      
  4. 在SecondAbility的Second頁面,點擊“停止SecondAbility自身并返回結(jié)果”按鈕,使用UIAbilityContext.terminateSelfWithResult方法,傳入不同的resultCode和want,手動銷毀Ability。成功后發(fā)起拉起側(cè)會收到abilityResult的值。示例代碼如下:
    // 停止SecondAbility自身并返回結(jié)果
    terminateSecondAbilityForResult(context: common.UIAbilityContext) {
      let abilityResult: common.AbilityResult = {
        resultCode: CommonConstants.RESULT_CODE,
        want: {
          'deviceId': '',
          'bundleName': CommonConstants.BUNDLE_NAME,
          'abilityName': CommonConstants.SECOND_ABILITY_NAME,
          'moduleName': CommonConstants.DEVICE_MODULE_NAME,
          'parameters': {
             src: returnMessage,
             count: CommonConstants.RESULT_NUM_VALUE
           }
        }
      };
    
      // 停止SecondAbility自身,并將abilityResult返回給startAbilityForResult接口調(diào)用方
      context.terminateSelfWithResult(abilityResult).then(() = > {
        Logger.info(CommonConstants.TAG, `terminate second ability self with
          result succeed with ${JSON.stringify(abilityResult)}`);
      }).catch((error: Error) = > {
        Logger.error(CommonConstants.TAG, `terminate second ability self with
          result failed with ${error}`);
      });
    }
    

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • 開發(fā)板
    +關(guān)注

    關(guān)注

    25

    文章

    5675

    瀏覽量

    104574
  • 鴻蒙
    +關(guān)注

    關(guān)注

    60

    文章

    2617

    瀏覽量

    44033
  • HarmonyOS
    +關(guān)注

    關(guān)注

    80

    文章

    2126

    瀏覽量

    32993
  • OpenHarmony
    +關(guān)注

    關(guān)注

    29

    文章

    3851

    瀏覽量

    18587
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點推薦

    深入理解HarmonyOS UIAbility:生命周期、WindowStage與啟動模式探析

    UIAbility組件概述 UIAbility組件是HarmonyOS中一種包含UI界面的應(yīng)用組件,主要用于與用戶進行交互。每個UIAbility
    的頭像 發(fā)表于 02-17 15:33 ?2213次閱讀
    深入理解<b class='flag-5'>HarmonyOS</b> <b class='flag-5'>UIAbility</b>:生命周期、WindowStage與啟動模式探析

    鴻蒙OS開發(fā)實例:【頁面傳值跳轉(zhuǎn)

    本篇主要介紹如何在HarmonyOS中,在頁面跳轉(zhuǎn)之間如何傳值 HarmonyOS頁面指的是帶有@Entry裝飾器的文件,其不能獨自存
    的頭像 發(fā)表于 03-29 20:16 ?2780次閱讀
    鴻蒙OS<b class='flag-5'>開發(fā)</b>實例:【<b class='flag-5'>頁面</b>傳值<b class='flag-5'>跳轉(zhuǎn)</b>】

    鴻蒙開發(fā)-應(yīng)用程序框架UIAbility的使用

    據(jù)傳遞、UIAbility的數(shù)據(jù)跳轉(zhuǎn)和數(shù)據(jù)傳遞,本章節(jié)主要講解UIAbility內(nèi)頁面的跳轉(zhuǎn)
    發(fā)表于 01-17 16:36

    UIAbility組件交互(設(shè)備內(nèi))說明

    UIAbility組件交互開發(fā),有以下相關(guān)實例可供參考: UIAbility內(nèi)UIAbility
    發(fā)表于 05-16 06:12

    ArkTS語言HarmonyOS/OpenHarmony應(yīng)用開發(fā)-router事件跳轉(zhuǎn)到指定UIAbility

    hilog.info(0x0000, \'testTag\', \'%{public}s\', \'Ability onBackground\'); } } *附件:ArkTS語言HarmonyOSOpenHarmony應(yīng)用開發(fā)-router事件
    發(fā)表于 06-13 17:22

    HarmonyOS/OpenHarmony應(yīng)用開發(fā)-Stage模型UIAbility組件使用(一)

    一、UIAbility組件概述1.概述 UIAbility組件是一種包含UI界面的應(yīng)用組件,主要用于和用戶交互。 UIAbility組件是系統(tǒng)調(diào)度的基本單元,為應(yīng)用提供繪制界
    發(fā)表于 06-28 10:32

    HarmonyOS/OpenHarmony應(yīng)用開發(fā)-Stage模型UIAbility組件使用(一)

    一、UIAbility組件概述1.概述 UIAbility組件是一種包含UI界面的應(yīng)用組件,主要用于和用戶交互。 UIAbility組件是系統(tǒng)調(diào)度的基本單元,為應(yīng)用提供繪制界
    發(fā)表于 06-28 10:32

    鴻蒙開發(fā)丨設(shè)備內(nèi) UIAbility 的幾種交互方式

    UIAbility 組件交互(設(shè)備內(nèi)) 在設(shè)備內(nèi)UIAbility(用戶界面能力)是系統(tǒng)調(diào)度的最小單元,它們負責(zé)展示用戶界面和執(zhí)行相關(guān)的
    的頭像 發(fā)表于 02-02 10:42 ?1044次閱讀
    鴻蒙<b class='flag-5'>開發(fā)</b>丨設(shè)備<b class='flag-5'>內(nèi)</b> <b class='flag-5'>UIAbility</b> 的幾種交互方式

    HarmonyOS開發(fā)案例:【Ability內(nèi)頁面跳轉(zhuǎn)

    基于Stage模型下的Ability開發(fā),實現(xiàn)Ability內(nèi)頁面跳轉(zhuǎn)和數(shù)據(jù)傳遞。
    的頭像 發(fā)表于 05-09 10:39 ?1002次閱讀
    <b class='flag-5'>HarmonyOS</b><b class='flag-5'>開發(fā)案</b>例:【Ability內(nèi)<b class='flag-5'>頁面</b><b class='flag-5'>間</b>的<b class='flag-5'>跳轉(zhuǎn)</b>】

    HarmonyOS開發(fā)案例:【UIAbility和自定義組件生命周期】

    本文檔主要描述了應(yīng)用運行過程中UIAbility和自定義組件的生命周期。對于UIAbility,描述了Create、Foreground、Background、Destroy四種生命周期。對于頁面
    的頭像 發(fā)表于 05-10 15:31 ?1980次閱讀
    <b class='flag-5'>HarmonyOS</b><b class='flag-5'>開發(fā)案</b>例:【<b class='flag-5'>UIAbility</b>和自定義組件生命周期】

    鴻蒙Ability Kit(程序框架服務(wù))【UIAbility組件基本用法】

    UIAbility組件的基本用法包括:指定UIAbility的啟動頁面以及獲取UIAbility的上下文[UIAbilityContext]。
    的頭像 發(fā)表于 06-06 11:02 ?908次閱讀
    鴻蒙Ability Kit(程序框架服務(wù))【<b class='flag-5'>UIAbility</b>組件基本用法】

    鴻蒙Ability Kit(程序框架服務(wù))【UIAbility組件交互(設(shè)備內(nèi))】

    UIAbility是系統(tǒng)調(diào)度的最小單元。在設(shè)備內(nèi)的功能模塊之間跳轉(zhuǎn)時,會涉及到啟動特定的UIAbility,該UIAbility可以是應(yīng)用
    的頭像 發(fā)表于 06-03 09:53 ?1106次閱讀
    鴻蒙Ability Kit(程序框架服務(wù))【<b class='flag-5'>UIAbility</b>組件<b class='flag-5'>間</b>交互(設(shè)備<b class='flag-5'>內(nèi)</b>)】

    鴻蒙Ability Kit(程序框架服務(wù))【UIAbility內(nèi)UIAbility頁面的跳轉(zhuǎn)

    基于Stage模型下的UIAbility開發(fā),實現(xiàn)UIAbility內(nèi)UIAbility
    的頭像 發(fā)表于 06-03 14:13 ?1294次閱讀
    鴻蒙Ability Kit(程序框架服務(wù))【<b class='flag-5'>UIAbility</b><b class='flag-5'>內(nèi)</b>和<b class='flag-5'>UIAbility</b><b class='flag-5'>間</b><b class='flag-5'>頁面的</b><b class='flag-5'>跳轉(zhuǎn)</b>】

    HarmonyOS 5】鴻蒙中的UIAbility詳解(三)

    HarmonyOS 5】鴻蒙中的UIAbility詳解(三) ##鴻蒙開發(fā)能力 ##HarmonyOS SDK應(yīng)用服務(wù)##鴻蒙金融類應(yīng)用 (金融理財# 一、前言 本文是鴻蒙中的
    的頭像 發(fā)表于 06-14 22:32 ?38次閱讀

    HarmonyOS 5】鴻蒙中的UIAbility詳解(二)

    HarmonyOS 5】鴻蒙中的UIAbility詳解(二) ##鴻蒙開發(fā)能力 ##HarmonyOS SDK應(yīng)用服務(wù)##鴻蒙金融類應(yīng)用 (金融理財# 一、前言 今天我們繼續(xù)深入講解
    的頭像 發(fā)表于 07-11 18:17 ?248次閱讀
    【<b class='flag-5'>HarmonyOS</b> 5】鴻蒙中的<b class='flag-5'>UIAbility</b>詳解(二)