ダイナミックテンプレートエンジンは、Alibaba YouKuテクノロジーチームによって開発された、純粋なネイティブダイナミックカードの軽量クロスプラットフォームソリューションです。
ダイナミックテンプレートエンジンは、Alibaba YouKuテクノロジーチームによって開発された、純粋なネイティブダイナミックカードの軽量クロスプラットフォームソリューションです。
クライアントSDKを除いて、テンプレートビジュアルビルドツール(GaiaStudio、デモプロジェクト)、テンプレートサンプル、リアルタイムプレビューを提供し、テンプレートの作成、テンプレートの編集、実マシンのデバッグ、リアルタイムプレビューをサポートします。
動的テンプレートエンジンは、ネイティブエクスペリエンスとパフォーマンスを同時に実現し、クライアントがローコードを実現できるようにすることを目的としています。
次の目標は、私たちのプロジェクトの前進です。
Rust / Android / Kotlin / iOS / OC / C ++ / JNI / CSS / FlexBox
jitpackソースを追加します。
// with setting.gradle pluginManagement { repositories { gradlePluginPortal() google() maven { url 'https://jitpack.io' } mavenCentral() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() maven { url 'https://jitpack.io' } mavenCentral() } } // with build.gradle allprojects { repositories { maven { url 'https://jitpack.io' } } }
Android-サポートバージョン:
implementation 'com.github.alibaba.GaiaX:GaiaX-Adapter:0.2.2.2-support' implementation 'com.github.alibaba.GaiaX:GaiaX:0.2.2.2-support' implementation 'com.alibaba:fastjson:1.2.76'
AndroidXバージョン:
implementation 'com.github.alibaba.GaiaX:GaiaX-Adapter:0.2.2.2' implementation 'com.github.alibaba.GaiaX:GaiaX:0.2.2.2' implementation 'com.alibaba:fastjson:1.2.76'
// Path used to store template resources /assets/${templateBiz}/${templateId}
// SDK usages // Initialization - Initializes the SDK GXTemplateEngine.instance.init(activity) // Build template parameters - Template information // activity - context // templateBiz - template biz id // templateId - template id val item = GXTemplateEngine.GXTemplateItem(activity, "templateBiz", "templateId") // Build template parameters - Viewport size (template draw size, similar to the concept of canvas in Android) val size = GXTemplateEngine.GXMeasureSize(100F.dpToPx(), null) // Build template parameters - Template data val dataJson = AssetsUtils.parseAssets(activity, "template-data.json") val data = GXTemplateEngine.GXTemplateData(dataJson) // Create template View - Creates a native View based on template parameters val view = GXTemplateEngine.instance.createView(item, size) // Bind the view data GXTemplateEngine.instance.bindData(view, data) // Insert the template into the container for rendering findViewById<ViewGroup>(R.id.template_container).addView(view, 0)
Podfileに依存関係を追加します
// Dependency pod 'GaiaXiOS'
テンプレートファイルをAppまたはFrameWorkに追加します
// Path used to store template resources xxx.bundle/templateId
// SDK Usages // Introduced header files #import <GaiaXiOS/GaiaXiOS.h> //register template service [TheGXRegisterCenter registerTemplateServiceWithBizId:bizId templateBundle:@"xxx.bundle"]; // Build template parameters - Template information // activity - context // templateBiz - template biz id // templateId - template id GXTemplateItem *item = [[GXTemplateItem alloc] init]; item.templateId = templateId; item.bizId = templateBiz; // Build template parameters - Viewport size (template draw size, similar to the concept of canvas in Android) CGSize size = CGSizeMake(1080, NAN); // Build template parameters - Template data GXTemplateData *data = [[GXTemplateData alloc] init]; data.data = @{@"xxx": @"xxx"}; // Create template View - Creates a native View based on template parameters UIView *view = [TheGXTemplateEngine creatViewByTemplateItem:item measureSize:size]; // Bind the view data [TheGXTemplateEngine bindData:data onView:view]; // Insert the template into the container for rendering [self.view addSubview:view];
プロジェクトのコードを提供することを歓迎します。コードを書く前に、提案の詳細とスキームの合理性について話し合うことができるように、問題またはプルリクエストを作成することから始めます。次の分野でコードを提供できます。
メール: biezhihua@gmail.com
Ali-GaiaX-Project is a template dynamic develop solutions developed by Alibaba and licensed under the Apache License (Version 2.0) This product contains various third-party components under other open source licenses. See the NOTICE file for more information.