HandlerFrame是一个基于观察者模式采用信息分发机制实现跨界面Handler通讯框架,整个项目里面只存在一个Handler实例对象。
HandlerFrameHandlerHandlerFrame HandlerHandler
1build.gradley
allprojects {
repositories {
//
maven { url 'https://jitpack.io' }
}
}
2HandlerFrame
compile 'com.github.liqinew:handlerframe:v1.0.0'
//BaseHandler
BaseHandlerOperate.getBaseHandlerOperate()
//OnBaseHandlerUpDateListenerHandler
.onSubscribe(SubscribeObject,new OnBaseHandlerUpDateListener())
//Message
.sendMessage(AcceptTheObjectOfYheInformation, Message-What, SendTheMessageContent)
//
.removeSubscribe(SubscribeObject)
//
.removeSubscribe();
OnBaseHandlerUpDateListenerHandler
OnBaseHandlerUpDateListenerMessage
star
Copyright 2017 Liqi
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.