• Stars
    star
    976
  • Rank 46,020 (Top 1.0 %)
  • Language
    Java
  • License
    Other
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RapidView is an android ui and lightapp development framework

RapidView

RapidView是一套用于开发Android客户端界面、逻辑以及功能的开发组件。布局文件(XML)及逻辑文件(Lua)可以运行时执行,主要用以解决Android客户端界面、逻辑快速更新以及快速开发的诉求。RapidView的XML语法规则与Android原生XML类似,而写逻辑的Lua部分除语言语法规则外,可以直接使用我们提供的Java API以及Android原生API,因此熟悉Android客户端开发的开发者上手成本会非常小。

除了解决动态更新问题外,RapidView希望Android开发者能够以更快的速度开发产品功能需求,因此我们在语法和开发方式上做了一些改变,期望开发者能够实现:小功能极速开发、大功能极速上线。

RapidView希望为开发者带来更小的安装包增量以及更加简单、易于维护和修改的组件库,RapidView的代码组件约180KB(30KB组件+150KB luaj)。

组件特性

  • 运行时加载,布局、逻辑可动态刷新

  • 无需编译,所见即所得,开发效率更高

  • 极小的安装包增量

  • Android开发者低上手成本

  • 与NATIVE开发体验相同

快速上手

我们为开发者提供了一个简单的DEMO,以及一个简易调试工具Rapid Studio。Rapid Studio除了支持简单的XML语法校验,Lua语法高亮以及自动补全外,还可以实现实时调试,这将极大缩短开发者的调试成本。除了这个exe工具外,我们还提供了具有类似功能的Visual Studio Code插件。在VS Code商店中搜索:Rapid Studio可以找到这个插件。

工程引入RapidView

初始化RapidView

将源码添加到工程目录下,在Application类的onCreate方法中添加如下代码进行初始化:

RapidPool.getInstance().initialize(this, null);

如果编译时需要混淆代码,请将*.rapidview.deobfuscated目录保持非混淆状态

加载RapidView

写一张简单的XML布局文件,保存在assets/rapidview目录下。打开RapidConfig.java,在VIEW{}的枚举中分配一个视图名,在Map中与XML关联。

XML布局文件

<relativelayout width="match_parent" height="match_parent" backgroundcolor="ffabcdef">
</relativelayout>

RapidConfig.java

    /**VIEW列表,此处配置仅为防止重名,便于索引。**/
    public enum VIEW{
        native_demo_view, //Demo视图
    }

    /** VIEW和NaitveXML的映射关系,当View不存在服务端下发的XML时,寻找本地XML作为默认布局 **/
    static{
        try{
            msMapViewNaitve.put(RapidConfig.VIEW.native_demo_view.toString(), "demo_view.xml");
        }
        catch (Exception e){
            e.printStackTrace();
        }

在需要加载RapidView的地方插入如下代码,即完成了简单的RapidView加载

        mRapidView = RapidLoader.load(
                RapidConfig.VIEW.native_demo_view.toString(),
                HandlerUtils.getMainHandler(),
                this,
                RelativeLayoutParams.class,
                map,
                null);

        setContentView(mRapidView.getView(), mRapidView.getParser().getParams().getLayoutParams());
        

开发与调试

打开RapidConfig.java,将一个名为DEBUG_MODE的静态boolean成员的值改为true并在本地重新编译并安装到手机。打开Rapid Studio调试小工具,点击文件->打开,选择工程下assets/rapidview目录,打开。

    /**DEBUG_MODE
     * 调试模式是否开启,一般发布时需要关闭。开启调试模式后,可以在rapiddebug目录中配置调试文件。调试文件
     * 实时,并以最高优先级生效。强烈推荐使用RapdiView皮肤引擎专用调试工具RapidStudio Studio调试界面,调
     * 试时需要安装开启调试模式的包。**/
    public final static boolean DEBUG_MODE = true;

工具目录下有一个rapid_config.ini的配置,工程目录中utils目录下有一个FileUtil的文件,这两个地方配置的目录要对应起来,否则调试会失败。

修改XML中的任意可见参数,如backgroundcolor,按ctrl+s保存,观察到log中提示“[100%]xxx”,表明文件被push到手机当中,重新加载当前activity(返回重新进入),查看效果。

Rapid Studio

Visual Studio Code插件

如果打算使用Visual Studio Code,可在插件商店中搜索Rapid Studio,相关介绍链接:

English Document

中文文档

Windows工具

点击下载链接下载Rapid Studio工具包。

许可协议(License)

RapidView使用 MIT 许可协议, 详见License文件。

个人信息保护规则

RapidView 在运行时只获取必要的信息UI加载流程能在不同操作系统版本的设备上正常执行,这些信息不涉及系统敏感权限和用户隐私相关的内容。同时 RapidView 不含上报逻辑,即不会上报获取到的信息。有关 RapidView 获取信息的类型及用途,请查看 RapidView SDK 个人信息保护规则 了解详情。

其它

详细开发指南请参阅开发文档,如果有其它问题,可以扫描下方二维码,加入QQ群咨询

More Repositories

1

weui

A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.
Less
27,124
star
2

wepy

小程序组件化开发框架
JavaScript
22,472
star
3

ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
C++
19,310
star
4

mars

Mars is a cross-platform network component developed by WeChat.
C++
17,192
star
5

tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Java
17,104
star
6

MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
C++
16,913
star
7

APIJSON

🏆 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 🏆 A JSON Transmission Protocol and an ORM Library 🚀 provides APIs and Docs without writing any code.
Java
16,817
star
8

vConsole

A lightweight, extendable front-end developer tool for mobile web page.
TypeScript
16,551
star
9

weui-wxss

A UI library by WeChat official design team, includes the most useful widgets/modules.
Less
15,024
star
10

QMUI_Android

提高 Android UI 开发效率的 UI 库
Java
14,397
star
11

rapidjson

A fast JSON parser/generator for C++ with both SAX/DOM style API
C++
13,987
star
12

secguide

面向开发人员梳理的代码安全指南
13,107
star
13

omi

Web Components Framework - Web组件框架
TypeScript
13,001
star
14

VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Java
11,779
star
15

matrix

Matrix is a plugin style, non-invasive APM system developed by WeChat.
Java
11,492
star
16

wcdb

WCDB is a cross-platform database framework developed by WeChat.
C
10,608
star
17

xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
C
9,166
star
18

libco

libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013.
C++
8,110
star
19

Hippy

Hippy is designed to easily build cross-platform dynamic apps. 👏
C++
7,911
star
20

Shadow

零反射全动态Android插件框架
Java
7,316
star
21

QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
Objective-C
7,050
star
22

MLeaksFinder

Find memory leaks in your iOS app at develop time.
Objective-C
5,405
star
23

lemon-cleaner

腾讯柠檬清理是针对macOS系统专属制定的清理工具。主要功能包括重复文件和相似照片的识别、软件的定制化垃圾扫描、可视化的全盘空间分析、内存释放、浏览器隐私清理以及设备实时状态的监控等。重点聚焦清理功能,对上百款软件提供定制化的清理方案,提供专业的清理建议,帮助用户轻松完成一键式清理。
Objective-C
5,255
star
24

libpag

The official rendering library for PAG (Portable Animated Graphics) files that renders After Effects animations natively across multiple platforms.
C++
4,790
star
25

kbone

一个致力于微信小程序和 Web 端同构的解决方案
JavaScript
4,744
star
26

puerts

PUER(普洱) Typescript. Let's write your game in UE or Unity with TypeScript.
C++
4,726
star
27

GT

GT (Great Tit) is a portable debugging tool for bug hunting and performance tuning on smartphones anytime and anywhere just as listening music with Walkman. GT can act as the Integrated Debug Environment by directly running on smartphones.
Java
4,387
star
28

TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
C++
4,328
star
29

westore

小程序项目分层架构
JavaScript
4,216
star
30

tmagic-editor

TypeScript
4,129
star
31

wujie

极致的微前端框架
TypeScript
3,860
star
32

vap

VAP是企鹅电竞开发,用于播放特效动画的实现方案。具有高压缩率、硬件解码等优点。同时支持 iOS,Android,Web 平台。
Objective-C
3,842
star
33

cherry-markdown

✨ A Markdown Editor
JavaScript
3,325
star
34

phxpaxos

The Paxos library implemented in C++ that has been used in the WeChat production environment.
C++
3,321
star
35

WeFlow

A web developer workflow tool by WeChat team based on tmt-workflow, with cross-platform supported and environment ready.
JavaScript
3,224
star
36

weui.js

A lightweight javascript library for WeUI.
JavaScript
3,162
star
37

spring-cloud-tencent

Spring Cloud Tencent is a Spring Cloud based Service Governance Framework provided by Tencent.
Java
3,131
star
38

tdesign

Enterprise Design System
Vue
3,054
star
39

tencent-ml-images

Largest multi-label image database; ResNet-101 model; 80.73% top-1 acc on ImageNet
Python
3,049
star
40

VasDolly

Android V1 and V2 Signature Channel Package Plugin
Java
3,029
star
41

Tendis

Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
C++
2,877
star
42

FaceDetection-DSFD

腾讯优图高精度双分支人脸检测器
Python
2,863
star
43

PhoenixGo

Go AI program which implements the AlphaGo Zero paper
C++
2,863
star
44

HunyuanDiT

Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding
Python
2,808
star
45

behaviac

behaviac is a framework of the game AI development, and it also can be used as a rapid game prototype design tool. behaviac supports the behavior tree, finite state machine and hierarchical task network(BT, FSM, HTN)
C#
2,792
star
46

PocketFlow

An Automatic Model Compression (AutoMC) framework for developing smaller and faster AI applications.
Python
2,782
star
47

MSEC

Mass Service Engine in Cluster(MSEC) is opened source by QQ team from Tencent. It is a backend DEV &OPS engine, including RPC,name finding,load balance,monitoring,release and capacity management.
Java
2,745
star
48

phxsql

A high availability MySQL cluster that guarantees data consistency between a master and slaves.
C++
2,470
star
49

OOMDetector

OOMDetector is a memory monitoring component for iOS which provides you with OOM monitoring, memory allocation monitoring, memory leak detection and other functions.
Objective-C++
2,310
star
50

tsf

coroutine and Swoole based php server framework in tencent
PHP
2,179
star
51

tmt-workflow

A web developer workflow used by WeChat team based on Gulp, with cross-platform supported and solutions prepared.
CSS
2,172
star
52

Hardcoder

Hardcoder is a solution which allows Android APP and Android System to communicate with each other directly, solving the problem that Android APP could only use system standard API rather than the hardware resource of system.
C++
2,145
star
53

UnLua

A feature-rich, easy-learning and highly optimized Lua scripting plugin for UE.
C++
2,079
star
54

LKImageKit

A high-performance image framework, including a series of capabilities such as image views, image downloader, memory caches, disk caches, image decoders and image processors.
Objective-C
2,078
star
55

TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
2,026
star
56

ObjectDetection-OneStageDet

单阶段通用目标检测器
Python
1,962
star
57

phxrpc

A simple C++ based RPC framework.
C++
1,943
star
58

InjectFix

InjectFix is a hot-fix solution library for Unity
C#
1,939
star
59

cloudbase-framework

腾讯云开发云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool. One-click deploy to serverless architecture. https://docs.cloudbase.net/framework/index
JavaScript
1,934
star
60

TscanCode

A static code analyzer for C++, C#, Lua
C++
1,932
star
61

GameAISDK

基于图像的游戏AI自动化框架
C++
1,918
star
62

soter

A secure and quick biometric authentication standard and platform in Android held by Tencent.
Java
1,907
star
63

plato

腾讯高性能分布式图计算框架Plato
C++
1,895
star
64

phxqueue

A high-availability, high-throughput and highly reliable distributed queue based on the Paxos algorithm.
C++
1,893
star
65

MedicalNet

Many studies have shown that the performance on deep learning is significantly affected by volume of training data. The MedicalNet project provides a series of 3D-ResNet pre-trained models and relative code.
Python
1,837
star
66

TSW

Tencent Server Web
TypeScript
1,802
star
67

NeuralNLP-NeuralClassifier

An Open-source Neural Hierarchical Multi-label Text Classification Toolkit
Python
1,799
star
68

QMUI_Web

An efficient front-end framework for developers building UI on the web.
JavaScript
1,721
star
69

sluaunreal

lua dev plugin for unreal engine 4 or 5
C++
1,691
star
70

Biny

Biny is a tiny, high-performance PHP framework for web applications
PHP
1,690
star
71

Metis

Metis is a learnware platform in the field of AIOps.
Python
1,663
star
72

paxosstore

PaxosStore has been deployed in WeChat production for more than two years, providing storage services for the core businesses of WeChat backend. Now PaxosStore is running on thousands of machines, and is able to afford billions of peak TPS.
C++
1,660
star
73

CodeAnalysis

Static Code Analysis - 静态代码分析
Python
1,610
star
74

TurboTransformers

a fast and user-friendly runtime for transformer inference (Bert, Albert, GPT2, Decoders, etc) on CPU and GPU.
C++
1,455
star
75

nohost

基于 Whistle 实现的多账号多环境远程配置及抓包调试平台
JavaScript
1,412
star
76

TencentOS-kernel

腾讯针对云的场景研发的服务器操作系统
1,401
star
77

TBase

TBase is an enterprise-level distributed HTAP database. Through a single database cluster to provide users with highly consistent distributed database services and high-performance data warehouse services, a set of integrated enterprise-level solutions is formed.
C
1,380
star
78

WeDemo

WeDemo为微信团队开源项目,用于帮助微信开发者完成微信登录、微信分享等功能的接入和开发。开发者可参考源代码完成开发,也可以直接将代码应用到自己的App开发中,安全、便捷地在App中实现微信分享、微信登录功能。
Objective-C
1,371
star
79

feflow

🚀 A command line tool aims to improve front-end engineer workflow and standard, powered by TypeScript.
TypeScript
1,356
star
80

tdesign-vue-next

A Vue3.x UI components lib for TDesign.
TypeScript
1,354
star
81

GAutomator

Automation for mobile games
Objective-C
1,331
star
82

flare

Flare是广泛投产于腾讯广告后台的现代化C++开发框架,包含了基础库、RPC、各种客户端等。主要特点为易用性强、长尾延迟低。
C++
1,279
star
83

TFace

A trusty face analysis research platform developed by Tencent Youtu Lab
Python
1,268
star
84

LuaPanda

lua debug and code tools for VS Code
Lua
1,219
star
85

FeatherCNN

FeatherCNN is a high performance inference engine for convolutional neural networks.
C++
1,206
star
86

tdesign-miniprogram

A Wechat MiniProgram UI components lib for TDesign.
HTML
1,136
star
87

tgfx

A lightweight 2D graphics library for rendering texts, geometries, and images with high-performance APIs that work across various platforms.
C++
1,020
star
88

TencentPretrain

Tencent Pre-training framework in PyTorch & Pre-trained Model Zoo
Python
985
star
89

tquic

A high-performance, lightweight, and cross-platform QUIC library
Rust
958
star
90

FAutoTest

A UI automated testing framework for H5 and applets
Python
930
star
91

TencentKona-8

Tencent Kona is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-term support(LTS) with quarterly updates. Tencent Kona serves as the default JDK internally at Tencent Cloud for cloud computing and other Java applications.
Java
920
star
92

hel

A module federation SDK which is unrelated to tool chain for module consumer. 工具链无关的运行时模块联邦sdk.
JavaScript
913
star
93

tdesign-vue

A Vue.js UI components lib for TDesign.
TypeScript
888
star
94

Pebble

Pebble分布式开发框架
C++
862
star
95

mxflutter

使用 TypeScript/JavaScript 来开发 Flutter 应用的框架。
Dart
838
star
96

Face2FaceTranslator

面对面翻译小程序是微信团队针对面对面沟通的场景开发的流式语音翻译小程序,通过微信同声传译插件提供了语音识别,文本翻译等功能。
JavaScript
829
star
97

tdesign-react

A React UI components lib for TDesign.
TypeScript
798
star
98

LightDiffusionFlow

This extension is developed for AUTOMATIC1111's Stable Diffusion web UI that provides import/export options for parameters.
JavaScript
770
star
99

Real-SR

Real-World Super-Resolution via Kernel Estimation and Noise Injection
Python
756
star
100

DCache

A distributed in-memory NOSQL system based on TARS framework, support LRU algorithm and data persists on back-end database. Users can easily deploy, publish, and scale services on the web interface.
C++
747
star