File tree Expand file tree Collapse file tree 10 files changed +43
-52
lines changed
src/main/java/com/guiying/main
src/main/java/com/guiying/news Expand file tree Collapse file tree 10 files changed +43
-52
lines changed Original file line number Diff line number Diff line change 5252 gsonVersion = " 2.8.0"
5353 photoViewVersion = " 2.0.0"
5454
55- // 需检查升级版本
56- annotationProcessor = " 1.1.7 "
57- routerVersion = " 1.2.2 "
55+ // 检查时间:2017.6.6
56+ annotationProcessor = " 1.0.3 "
57+ routerVersion = " 1.2.1.1 "
5858 easyRecyclerVersion = " 4.4.0"
5959 cookieVersion = " v1.0.1"
6060 toastyVersion = " 1.1.3"
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ dependencies {
3333 compile " com.github.GrenderG:Toasty:$rootProject . toastyVersion "
3434
3535 // router
36- compile " com.github.mzule.activityrouter:activityrouter :$rootProject . routerVersion "
36+ compile " com.alibaba:arouter-api :$rootProject . routerVersion "
3737}
Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ android {
1313 targetSdkVersion rootProject. ext. targetSdkVersion
1414 versionCode rootProject. ext. versionCode
1515 versionName rootProject. ext. versionName
16+
17+ // ARouter
18+ javaCompileOptions {
19+ annotationProcessorOptions {
20+ arguments = [moduleName : project. getName()]
21+ }
22+ }
1623 }
1724
1825
@@ -29,14 +36,11 @@ android {
2936 }
3037 }
3138 }
32- // 设置了resourcePrefix值后,所有的资源名必须以指定的字符串做前缀,否则会报错。
33- // 但是resourcePrefix这个值只能限定xml里面的资源,并不能限定图片资源,所有图片资源仍然需要手动去修改资源名。
34- // resourcePrefix "girls_"
3539
3640}
3741
3842dependencies {
3943 compile fileTree(dir : ' libs' , include : [' *.jar' ])
40- annotationProcessor " com.github.mzule.activityrouter: compiler:$rootProject . annotationProcessor "
44+ annotationProcessor " com.alibaba:arouter- compiler:$rootProject . annotationProcessor "
4145 compile project(' :lib_common' )
4246}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 55import android .view .View ;
66import android .widget .Button ;
77
8- import com .github . mzule . activityrouter . router . Routers ;
8+ import com .alibaba . android . arouter . launcher . ARouter ;
99import com .guiying .common .base .BaseActivity ;
1010import com .guiying .common .base .BaseApplication ;
1111import com .guiying .common .utils .ToastUtils ;
1212
13+ /**
14+ * <p>类说明</p>
15+ *
16+ * @author 张华洋 2017/7/1 13:13
17+ * @version V1.2.0
18+ * @name MainActivity
19+ */
1320public class MainActivity extends BaseActivity implements View .OnClickListener {
1421
1522 private long exitTime = 0 ;
@@ -29,9 +36,11 @@ protected void onCreate(Bundle savedInstanceState) {
2936 @ Override
3037 public void onClick (View view ) {
3138 if (view .getId () == R .id .news_button ) {
32- Routers .open (MainActivity .this , "module://news" );
39+ //跳转到NewsCenterActivity
40+ ARouter .getInstance ().build ("/news/center" ).navigation ();
3341 } else if (view .getId () == R .id .girls_button ) {
34- Routers .open (MainActivity .this , "module://girls" );
42+ //跳转到GirlsActivity
43+ ARouter .getInstance ().build ("/girls/list" ).navigation ();
3544 }
3645 }
3746
Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ android {
1313 targetSdkVersion rootProject. ext. targetSdkVersion
1414 versionCode rootProject. ext. versionCode
1515 versionName rootProject. ext. versionName
16+
17+ // ARouter
18+ javaCompileOptions {
19+ annotationProcessorOptions {
20+ arguments = [moduleName : project. getName()]
21+ }
22+ }
1623 }
1724
1825 sourceSets {
@@ -29,15 +36,10 @@ android {
2936 }
3037 }
3138
32- // 设置了resourcePrefix值后,所有的资源名必须以指定的字符串做前缀,否则会报错。
33- // 但是resourcePrefix这个值只能限定xml里面的资源,并不能限定图片资源,所有图片资源仍然需要手动去修改资源名。
34- // resourcePrefix "girls_"
35-
36-
3739}
3840
3941dependencies {
4042 compile fileTree(dir : ' libs' , include : [' *.jar' ])
41- annotationProcessor " com.github.mzule.activityrouter: compiler:$rootProject . annotationProcessor "
43+ annotationProcessor " com.alibaba:arouter- compiler:$rootProject . annotationProcessor "
4244 compile project(' :lib_common' )
4345}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33import android .os .Bundle ;
44
5+ import com .alibaba .android .arouter .facade .annotation .Route ;
56import com .guiying .common .base .BaseActivity ;
67
78/**
1112 * @version V1.2.0
1213 * @name NewsDetailActivity
1314 */
15+ @ Route (path = "/news/detail" )
1416public class NewsDetailActivity extends BaseActivity {
1517
1618 @ Override
Original file line number Diff line number Diff line change 55import android .support .v4 .view .ViewPager ;
66import android .support .v7 .widget .Toolbar ;
77
8- import com .github . mzule . activityrouter . annotation .Router ;
8+ import com .alibaba . android . arouter . facade . annotation .Route ;
99import com .guiying .common .base .BaseActivity ;
1010import com .guiying .news .R ;
1111
1515import java .util .List ;
1616import java .util .Locale ;
1717
18- @ Router ("news" )
18+ /**
19+ * <p>类说明</p>
20+ *
21+ * @author 张华洋 2017/4/20 22:26
22+ * @version V1.2.0
23+ * @name NewsCenterActivity
24+ */
25+ @ Route (path = "/news/center" )
1926public class NewsCenterActivity extends BaseActivity {
2027
2128 protected Toolbar mToolBar ;
Original file line number Diff line number Diff line change 2222 * @version V1.2.0
2323 * @name NewsListAdapter
2424 */
25-
26-
2725public class NewsListAdapter extends RecyclerArrayAdapter <Story > {
2826
2927 public NewsListAdapter (Context context ) {
You can’t perform that action at this time.
0 commit comments