<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>
0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
創作中心

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

3天內不再提示

鴻蒙開發實戰:基于【Markwon】移植和開發

jf_46214456 ? 來源:jf_46214456 ? 作者:jf_46214456 ? 2024-03-25 16:27 ? 次閱讀

本項目是基于開源項目Markwon進行適用harmonyos的移植和開發的。

移植版本:v4.6.2

1. 項目介紹

項目名稱:Markwon

所屬系列:harmonyos的第三方組件適配移植

功能:

  • Emphasis (*, _)
  • Strong emphasis (**, __)
  • Strike-through (~~)
  • Headers (#{1,6})
  • Links () && [][])
  • Images
  • Thematic break (---, ***, ___)
  • Quotes & nested quotes (>{1,})
  • Ordered & non-ordered lists & nested ones
  • Strike-through (, , )~~
  • Link (a).

項目移植狀態:

項目已完成移植,完成度50%,差異如下

  • 主界面點擊右上角圖標,進入README.md界面不能正常顯示內容
  • 主界面stable 版本信息欄使用固定信息及樣式
  • 主界面CHECK FOR UPDATE 點擊檢測更新版本無對應鏈接
  • 主界面列表條目點擊后進入頁面不能正常顯示內容
  • 主界面列表條目標簽4個以上不能自動換行
    添加了demo模塊用于效果展示;

編程語言:java

2. 集成指引

方式一

  1. 下載或自行編譯生成Markwon的.har文件,文件路徑為:./demo/libs/Markwon-debug.har。
  2. 自行編譯時,需要注意要自行添加簽名。
  3. 導入你的harmonyos項目模塊的**./libs**中。
  4. 在模塊下的build.gradle中確認依賴**./libs**下的.har包,implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])。
  5. 在代碼中使用。

方式二:

  1. 在根目錄的build.gradle文件中添加mavenCentral()
    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    ...
    buildscript {
        repositories {
            ...
            mavenCentral()
        }
        ...
    }
    
    allprojects {
        repositories {
            ...
            mavenCentral()
        }
    }
    
  2. 在module目錄下的build.gradle文件中添加``
    ...
    dependencies {
        ...
        implementation 'com.gitee.ts_ohos:markwon:1.0.1'
    }
    

3. 使用說明

更多用法參考本項目的 demo ,原項目Java DocOHOS的文檔。
主要用法如下:

Inline HTML

< u >< i >H< sup >T< sub >M< /sub >< /sup >< b >< s >L< /s >< /b >< /i >< /u >

*HTML*


< ScrollView
  android:id="@+id/scroll_view"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_marginTop="?android:attr/actionBarSize" >

  < TextView
    android:id="@+id/text"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="16dip"
    android:lineSpacingExtra="2dip"
    android:textSize="16sp"
    tools:text="yonman" / >

< /ScrollView >
// username, repo, branch, lastPathSegment

    String RE_FILE = "^"+TextUtils.getHttps()+"github.com/([w-.]+?)/([w-.]+?)/(?:blob|raw)/([w-.]+?)/(.+)$";
    private static final String RE_REPOSITORY = "^"+TextUtils.getHttps()+"github.com/([w-.]+?)/([w-.]+?)/*$";

    public static Pair< String, String > parseRepository(String url) {

        Pattern pattern = Pattern.compile(RE_REPOSITORY);
        Matcher matcher = pattern.matcher(url);
        if (matcher.matches()) {
            String user = matcher.group(1);
            String repository = matcher.group(2);
            if (TextUtils.isEmpty(user) || TextUtils.isEmpty(user)) {
                return new Pair<  >(null, null);
            } else {
                return new Pair<  >(user, repository);
            }
        } else {
            return new Pair< String, String >(null, null);
        }
    }
private static final String SAMPLE_PREFIX = "io.noties.markwon.app.";

    @NonNull
    public static List< Sample > readSamples(@NonNull Context context) {

        RawFileEntry rawFileEntry = context.getResourceManager().getRawFileEntry("resources/rawfile/samples.json");
        try (InputStream inputStream = rawFileEntry.openRawFile()) {
            return readSamples(inputStream);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

更多鴻蒙開發應用知識已更新gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md參考前往。

或+mau123789學習,是v喔

鴻蒙系統移植和裁剪定制.png

4. 效果演示

1. 主界面展示
2. 點擊item中plugin標簽,顯示選擇結果

*注 : demo中的圖片是點擊不同標簽,進行篩選顯示結果

5. 版本迭代

  • v1.0.0 基于原項目最新版本,移植功能及提交。
  • v1.0.1 更新harmonyos API至5。

6. 版本和許可信息

  • Apache License 2.0
  • [LICENSE]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

審核編輯 黃宇

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • 開源
    +關注

    關注

    3

    文章

    3009

    瀏覽量

    41751
  • 鴻蒙
    +關注

    關注

    55

    文章

    1786

    瀏覽量

    42158
  • HarmonyOS
    +關注

    關注

    79

    文章

    1893

    瀏覽量

    29354
收藏 人收藏

    評論

    相關推薦

    鴻蒙實戰項目開發:【短信服務】

    數據管理 電話服務 分布式應用開發 通知與窗口管理 多媒體技術 安全技能 任務管理 WebGL 國際化開發 應用測試 DFX面向未來設計 鴻蒙系統移植和裁剪定制 …… ? 《
    發表于 03-03 21:29

    Mini2440 Linux移植開發實戰指南

    Mini2440 Linux移植開發實戰指南
    發表于 08-20 19:26

    【連載】信盈達實力大佬講師帶你學習鴻蒙系統移植和驅動開發!

    鴻蒙開發課程介紹:第一節鴻蒙操作系統需要安裝的軟件有哪些,本節課將會重點介紹軟件的安裝步驟,以及如何獲取安裝包。連載中...第二節接著將帶領大家進行u-boot、內核、根文件系統的移植
    發表于 09-11 10:25

    【精品連載】韋東山老師帶你上手鴻蒙內核Liteos-a開發

    驗Harmony系統。作為Harmony系統內核的liteos-a,設計精巧而輕薄,只需要簡單移植就可以在第3方芯片上運行。本課程注重實戰,將在第3方芯片上移植liteos-a最小系統。第一部分
    發表于 09-18 18:05

    【專家問答】楊光明:鴻蒙系統研發工程師教你從0開發鴻蒙PCB開發

    `前言:本期我們邀請到了張飛實戰電子團隊的鴻蒙系統研發工程師楊光明老師@aMi楊光明,本期高手問答中老師將為我們解答大家在Linux系統開發,單片機開發,以及在進行
    發表于 09-25 15:24

    LabVIEW入門與實戰開發100例

    LabVIEW入門與實戰開發100例LabVIEW入門與實戰開發100例LabVIEW入門與實戰開發
    發表于 02-18 11:44 ?0次下載

    c#開發Android應用實戰

    c#開發Android應用實戰
    發表于 07-14 13:32 ?0次下載

    iTOP-4412開發板-實戰教程-ssh服務器移植到arm開發

    迅為iTOP-4412開發板-實戰教程-ssh服務器移植到arm開發
    發表于 05-15 11:11 ?28次下載

    華為開發者大會分論壇HarmonyOS測試技術與實戰-鴻蒙智聯認證生態設備測試挑戰

    HDC 2021華為開發者大會分論壇HarmonyOS測試技術與實戰-鴻蒙智聯認證生態設備測試挑戰
    的頭像 發表于 10-23 16:40 ?1553次閱讀
    華為<b class='flag-5'>開發</b>者大會分論壇HarmonyOS測試技術與<b class='flag-5'>實戰</b>-<b class='flag-5'>鴻蒙</b>智聯認證生態設備測試挑戰

    RISC-V MCU開發實戰 (三):移植鴻蒙OS項目

    移植鴻蒙OS項目
    的頭像 發表于 11-01 11:08 ?2632次閱讀
    RISC-V MCU<b class='flag-5'>開發</b><b class='flag-5'>實戰</b> (三):<b class='flag-5'>移植</b><b class='flag-5'>鴻蒙</b>OS項目

    鴻蒙系統開發教程_韋東山 2-1移植RTOS需要做的事

    鴻蒙系統開發教程_韋東山 2-1移植RTOS需要做的事
    發表于 11-13 21:06 ?17次下載
    <b class='flag-5'>鴻蒙</b>系統<b class='flag-5'>開發</b>教程_韋東山  2-1<b class='flag-5'>移植</b>RTOS需要做的事

    arduino開發實戰指南

    arduino開發實戰指南
    發表于 02-22 14:56 ?0次下載

    Python項目開發實戰

    Python項目開發實戰
    發表于 06-13 14:51 ?2次下載

    使用 Taro 開發鴻蒙原生應用 —— 快速上手,鴻蒙應用開發指南

    隨著鴻蒙系統的不斷完善,許多應用廠商都希望將自己的應用移植鴻蒙平臺上。最近,Taro 發布了 v4.0.0-beta.x 版本,支持使用 Taro 快速開發
    的頭像 發表于 02-02 16:09 ?417次閱讀
    使用 Taro <b class='flag-5'>開發</b><b class='flag-5'>鴻蒙</b>原生應用 —— 快速上手,<b class='flag-5'>鴻蒙</b>應用<b class='flag-5'>開發</b>指南

    鴻蒙ArkUI【開發移植Carbon】

    本項目是基于開源項目[Carbon]?進行harmonyos化的移植開發的。
    的頭像 發表于 03-25 15:41 ?241次閱讀
    <b class='flag-5'>鴻蒙</b>ArkUI【<b class='flag-5'>開發</b><b class='flag-5'>移植</b>Carbon】
    亚洲欧美日韩精品久久_久久精品AⅤ无码中文_日本中文字幕有码在线播放_亚洲视频高清不卡在线观看
    <acronym id="s8ci2"><small id="s8ci2"></small></acronym>
    <rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
    <acronym id="s8ci2"></acronym>
    <acronym id="s8ci2"><center id="s8ci2"></center></acronym>