Jomes/routerSDK
소개
A mini and excellent Router Framwork一款小而美的路由框架。网页动态添加自定义参数启动应用。 https://github.com/Jomes/routerSDK
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original#RouterSDK RouterSDK is an excellent Router Framwork ,it is easy to integrate in your project. You can start an application through the web page by the custom parameters. In addition, it can also provides a number of useful features such as dynamic routing configuration, jump animation, task station, jump pretreatment, etc.
Screenshot

Build
Step 1. Add the JitPack repository to your build file
add the JitPack maven to your project in root build.gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Step 2. Add module dependency build.gradle
dependencies {
compile 'com.github.Jomes:routerSDK:v1.0.3-alpha'
}
That's it!
How to use
init RouteTable in application
Router.initRouteTable(new IRouteTableMapping() {
@Override
public void operaRouterTable(Map<String, Class<? extends Activity>> map) {
map.put("jomeslu://www", OneActivity.class);
map.put("jomeslu://loginactivity", LoginActivity.class);
}
});
Router Jump page
Router.build("http://androidblog.cn/index.php/Source").start(MainActivity.this);
Definition Of type
- Scheme:suggest to define application name which router to use
- Host: suggest to define page where to go, such activity
- path : Transfer parameter,customer type
| key format | {i:ikey} | {f:key} | {l:key} | {d:key} | {s:key} | {b:key} |
|---|---|---|---|---|---|---|
| type | integer | float | long | double | string | boolean |
eg :From A page to B page use url :jomeslu://www?{i:id}=168&{s:jomeslu}=jomeslu
A page
Router.build("jomeslu://www?{i:id}=168&{s:jomeslu}=jomeslu").setIRouteInterceptor(new IRouteInterceptor() {
@Override
public boolean interceptor() {
Router.build("jomeslu://loginactivity?{i:id}=168&{s:jomeslu}=jomeslu").start(MainActivity.this);
Toast.makeText(MainActivity.this, "login...", Toast.LENGTH_LONG).show();
return true;
}
}).start(MainActivity.this);;
B Page Receive parameter as normal
String jomeslu = getIntent().getStringExtra("jomeslu");
int id = getIntent().getIntExtra("id", -1);
License
관련 프로젝트 살펴보기
불러오는 중…