KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
fast-event
★ 14
Open GitHub ↗
Simple event creation
Download README (.md)
Explore Similar Repositories
gStoreD
:
A Distributed RDF Data Management System for Processing SPARQL Queries Over Distributed RDF Graphs
Rar-Password-Cracker
:
It's A Batch Code To Cracke RAR Encrypted Floders And Files
KBC-Game
:
The Classic Quiz Game, Kaun Banega Crorepati (The Indian version of Who wants to be a Millionaire?)
MVVMBinderUseReactiveCocoa
:
iOS MVVM use ReactiveCocoa for Binder
ismir2016
:
Instructions for reproducing the research described in the paper "Tempo Estimation for Music Loops and a Simple Confidence Measure"
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
fast-event
?
Download (.md)
# fast-event Simple event creation [](https://jitpack.io/#fcannizzaro/fast-event) [](https://travis-ci.org/fcannizzaro/fast-event) [](http://android-arsenal.com/details/1/3647) # How to include **Step 1.** Add it in your root **build.gradle** at the end of repositories: ```gradle allprojects { repositories { ... maven { url "https://jitpack.io" } } } ``` **Step 2.** Add the dependency ```gradle dependencies { compile 'com.github.fcannizzaro:fast-event:1.0.0' } ``` # Static Methods ### bind(Class clazz, [, Activity activity]) register event annotations. ### emit(event, Object ... args) emit event. ### delete(event) delete event. # Annotations ### @Event(String: event) define method to run. ### @OnUi run method on ui. ### @Async run method on a thread. # Usage ## Activity / Service / Class ```java class Sample extends Activity { @OnUi @Event("my-event") private void onUpdate(String key, Integer counter) { // do something } @Async @Event("my-event-on-thread") private void onUpdate(String key) { // do something } @Override protected void onCreate(Bundle savedInstanceState) { ... FastEvent.bind(this); ... } } ``` ## Fragment ```java class Sample extends Fragment { // define events // ... @Override public void onCreate(@Nullable Bundle savedInstanceState) { ... FastEvent.bind(this, getActivity()); ... } } ``` ## Emit ```java FastEvent.emit("my-event", "fcannizzaro", 20); ``` # License MIT - **Francesco Cannizzaro**