GeekNews
GeekNews copied to clipboard
:books:A pure reading App based on Material Design + MVP + RxJava2 + Retrofit + Dagger2 + Realm + Glide
```java public abstract class BaseActivity extends SimpleActivity implements BaseView { @Inject protected T mPresenter; protected ActivityComponent getActivityComponent(){ return DaggerActivityComponent.builder() .appComponent(App.getAppComponent()) .activityModule(getActivityModule()) .build(); } ``` ActivityComponent 里面都没得返回T extends BasePresenter 的接口。。所以只要一写。就提示我 要在ActivityComponent...
快速上拉加载多页后,顶部留有空白 [解决方案,亲测可行](https://juejin.im/entry/57c64fb07db2a20068220fcd)
``` public boolean onMove(int srcPosition, int targetPosition) { if (mList != null) { // 更换数据库中的数据Item的位置 boolean isPlus = srcPosition < targetPosition; mPresenter.changeLikeTime(mList.get(srcPosition).getId(),mList.get(targetPosition).getTime(),isPlus); // 更换数据源中的数据Item的位置 Collections.swap(mList, srcPosition, targetPosition); // 更新UI中的Item的位置,主要是给用户看到交互效果 mAdapter.notifyItemMoved(srcPosition,...
本人把你的最小支持的sdk改成15,在17的手机上跑起来直接崩溃了,6.0手机没有问题,报错如下: android.view.InflateException: Binary XML file line #10: Error inflating class com.codeest.geeknews.widget.ProgressImageView at android.view.LayoutInflater.createView(LayoutInflater.java:613) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at android.view.View.inflate(View.java:16617) at com.codeest.geeknews.base.RootFragment.initEventAndData(RootFragment.java:46) 请问是什么原因呢?
Realm数据库初始化的时候 在夜神、逍遥等第三方的模拟器上运行崩溃报错信息:io.realm.internal.async.RealmThreadPoolExecutor 在谷歌官方studio上的模拟器和真机上测试都没有任何问题, 这是为什么?
在 com.codeest.geeknews.app.App#getAppComponent(位置: https://github.com/codeestX/GeekNews/blob/master/app/src/main/java/com/codeest/geeknews/app/App.java) 中引用了类型: com.codeest.geeknews.di.component.DaggerAppComponent, 然而项目中并没有这个文件(见 https://github.com/codeestX/GeekNews/tree/master/app/src/main/java/com/codeest/geeknews/di/component), 请问如何处理? 非常感谢
请问你这个项目的单元测试怎写啊,一直空指针异常: ``` public class MainPresenterTest { @Rule public MockitoRule mockitoRule = MockitoJUnit.rule(); @Mock private ZhihuApis mZhihuApiService; @Mock private GankApis mGankApiService; @Mock private WeChatApis mWechatApiService; @Mock private MyApis mMyApiService; @Mock private...