Commit a8cc47349af77eaa4aeba2d95b71b743736b687d
1 parent
ef9f915c
MvpViewStateBindingFragment bind data correct
Showing
4 changed files
with
6 additions
and
5 deletions
app/build.gradle
| @@ -52,11 +52,11 @@ dependencies { | @@ -52,11 +52,11 @@ dependencies { | ||
| 52 | // TODO 本地酷使用说明 代码仓库标识 | 52 | // TODO 本地酷使用说明 代码仓库标识 |
| 53 | // compile 'com.cnlive.libs:base:1.0.0@aar' | 53 | // compile 'com.cnlive.libs:base:1.0.0@aar' |
| 54 | // compile 'com.cnlive:cnlive:0.2.0' | 54 | // compile 'com.cnlive:cnlive:0.2.0' |
| 55 | - | 55 | + compile project(':cnlive') |
| 56 | compile("com.github.hotchemi:permissionsdispatcher:2.4.0") { | 56 | compile("com.github.hotchemi:permissionsdispatcher:2.4.0") { |
| 57 | // if you don't use android.app.Fragment you can exclude support for them | 57 | // if you don't use android.app.Fragment you can exclude support for them |
| 58 | exclude module: "support-v13" | 58 | exclude module: "support-v13" |
| 59 | } | 59 | } |
| 60 | annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:2.4.0" | 60 | annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:2.4.0" |
| 61 | - compile project(':cnlive') | 61 | + |
| 62 | } | 62 | } |
cnlive/build.gradle
| @@ -35,6 +35,7 @@ android { | @@ -35,6 +35,7 @@ android { | ||
| 35 | 35 | ||
| 36 | dependencies { | 36 | dependencies { |
| 37 | compile fileTree(include: ['*.jar'], dir: 'libs') | 37 | compile fileTree(include: ['*.jar'], dir: 'libs') |
| 38 | + //RecyclerView 需要支持库 ,打包时已取消对其发布 | ||
| 38 | compile 'com.android.support:recyclerview-v7:26.+' | 39 | compile 'com.android.support:recyclerview-v7:26.+' |
| 39 | //MVP | 40 | //MVP |
| 40 | compile 'com.hannesdorfmann.mosby3:mvp:3.0.4' | 41 | compile 'com.hannesdorfmann.mosby3:mvp:3.0.4' |
| @@ -74,7 +75,7 @@ ext { | @@ -74,7 +75,7 @@ ext { | ||
| 74 | siteUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo' | 75 | siteUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo' |
| 75 | gitUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo.git' | 76 | gitUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo.git' |
| 76 | 77 | ||
| 77 | - libraryVersion = '0.2.1' | 78 | + libraryVersion = '0.2.2' |
| 78 | 79 | ||
| 79 | developerId = 'CNlive' | 80 | developerId = 'CNlive' |
| 80 | developerName = 'Granzon' | 81 | developerName = 'Granzon' |
cnlive/src/main/java/com/cnlive/libs/base/data/network/RetrofitUtil.java
| @@ -3,6 +3,7 @@ package com.cnlive.libs.base.data.network; | @@ -3,6 +3,7 @@ package com.cnlive.libs.base.data.network; | ||
| 3 | 3 | ||
| 4 | import android.content.Context; | 4 | import android.content.Context; |
| 5 | 5 | ||
| 6 | +import com.cnlive.libs.base.application.Application; | ||
| 6 | import com.cnlive.libs.base.util.LogUtil; | 7 | import com.cnlive.libs.base.util.LogUtil; |
| 7 | 8 | ||
| 8 | import java.security.KeyStore; | 9 | import java.security.KeyStore; |
| @@ -23,7 +24,7 @@ import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; | @@ -23,7 +24,7 @@ import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; | ||
| 23 | import retrofit2.converter.gson.GsonConverterFactory; | 24 | import retrofit2.converter.gson.GsonConverterFactory; |
| 24 | 25 | ||
| 25 | public class RetrofitUtil { | 26 | public class RetrofitUtil { |
| 26 | - public static boolean DEBUG = true; | 27 | + private static boolean DEBUG = Application.isDebug(); |
| 27 | 28 | ||
| 28 | private static final String TAG = "RetrofitUtil"; | 29 | private static final String TAG = "RetrofitUtil"; |
| 29 | 30 |
cnlive/src/main/java/com/cnlive/libs/base/frame/fragment/MvpViewStateBindingFragment.java
| @@ -26,7 +26,6 @@ public abstract class MvpViewStateBindingFragment<V extends MvpStateView<D>, P e | @@ -26,7 +26,6 @@ public abstract class MvpViewStateBindingFragment<V extends MvpStateView<D>, P e | ||
| 26 | @Override | 26 | @Override |
| 27 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | 27 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| 28 | binding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false); | 28 | binding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false); |
| 29 | - ReflectUtil.invoke(binding, "setData", getViewData()); | ||
| 30 | return binding.getRoot(); | 29 | return binding.getRoot(); |
| 31 | } | 30 | } |
| 32 | 31 |