Hybrid也已经火了很长一段时间了,但是一直有人不知从何入手。 那么下面是我花了一段时间做的一个Hybrid框架,并基于这个框架和Django编写了一个Demo, 支持H5和Native的无缝调用,并支持自定义事件的扩展.
以上只是Demo的一部分效果,具体的可以见Demo-Android中.
- 通过注入
JSBridge
来无缝调用H5和Native - 重构WebView和WebViewClient生命周期中的所有方法
- 依赖AppDynamicFramework,来动态加载Hybrid框架,即
jniLibs/armeabi/libh5core.so
- 通过注解自定义Hybrid扩展事件
- CreatePage()可将Hybrid页面嵌入到其他View
- 等等的
Any further question?
Email me please!
Copyright 2017 xiyouMc
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
http://www.apache.org/licenses/LICENSE-2.0
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.