xiaobailong24 / mvvmarms Goto Github PK
View Code? Open in Web Editor NEWAndroid MVVM Architecture Components based on MVPArms and Android Architecture Components.
License: Apache License 2.0
Android MVVM Architecture Components based on MVPArms and Android Architecture Components.
License: Apache License 2.0
如果有什么想法或者建议,可以随时交流。欢迎大家一起贡献。
Welcome to communicate and discuss.
在编译过程中出现问题
如果吧把inject(App app) -> inject(Application app),编译通过,但是activityInjector返回为 null。只有把@AppScope改成@singleton,然后同时用inject(App app) 才能运行成功,请问这是为什么呢?
Hello:
最近在再看MVVM架构相关的一些东西,发现MVVMArms中含有Dagger.Android的库,但是里面却没有按照Dagger.Android的推荐方式去使用,是因为封装BaseActivity使用泛型有问题而不继承DaggerActivity的吗?
把maven中的url改成https://dl.google.com/dl/android/maven2 也不行,代理一直开着。大佬有啥解决方法么?
就是可以有备用域名,在主域名down,切换备用域名
Caused by: java.lang.IllegalArgumentException: Unable to find ConfigRepository implementation at me.xiaobailong24.mvvmarms.repository.utils.ManifestRepositoryParser.parseModule(ManifestRepositoryParser.java:53) at me.xiaobailong24.mvvmarms.repository.utils.ManifestRepositoryParser.parse(ManifestRepositoryParser.java:37) at me.xiaobailong24.mvvmarms.repository.RepositoryInjector.<init>(RepositoryInjector.java:28) at me.xiaobailong24.mvvmarms.base.AppDelegate.<init>(AppDelegate.java:41) at me.xiaobailong24.mvvmarms.base.BaseApplication.attachBaseContext(BaseApplication.java:49)
Caused by: java.lang.ClassNotFoundException: me.xiaobailong24.mvvmarms.weather.app.RepositoryConfiguration at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:251) at java.lang.Class.forName(Class.java:216) at me.xiaobailong24.mvvmarms.repository.utils.ManifestRepositoryParser.parseModule(ManifestRepositoryParser.java:51) at me.xiaobailong24.mvvmarms.repository.utils.ManifestRepositoryParser.parse(ManifestRepositoryParser.java:37) at me.xiaobailong24.mvvmarms.repository.RepositoryInjector.<init>(RepositoryInjector.java:28) at me.xiaobailong24.mvvmarms.base.AppDelegate.<init>(AppDelegate.java:41) at me.xiaobailong24.mvvmarms.base.BaseApplication.attachBaseContext(BaseApplication.java:49)
看了demo,viewmodel是使用livedata的,但是个人觉得livedata远没有rxjava强大。如果在viewmodel使用rxjava,那么该如何实现类似livedata那样的动态更新数据?
我的一个UserViewModel 有如下的成员
public final ObservableField mUserViewModel = new ObservableField<>();
public final ObservableField mDis = new ObservableField<>();
public final ObservableInt mCount = new ObservableInt();
和UI双向绑定之后,如果我想修改mDis的数据直接这样
viewModel.mDis.set("dis修改后"); //userViewModel是UserViewModel 类型
这样UI就会自动刷新
如果我想修改mUserViewModel 中的UserBean的数据,修改后UI不会自动刷新
我想到因为UserBean是一个单纯的实体类,所有没有被监听.
如果是让UserBean 去继承BaseObservable,写很多notify则破坏了实体类的单纯性.
不知道有没有什么办法解决这个绑定问题
3KS
我的dagger用的不熟,对于项目中 注入 有几个疑问:
1: @module(includes = {ViewModelFactoryModule.class,
WeatherActivityModule.class,
WeatherNowFragmentModule.class,
WeatherDailyFragmentModule.class}) 要像这样在appModule中吧所有的module都写进来嘛
2 mViewModel = ViewModelProviders.of(this, mViewModelFactory).get(WeatherViewModel.class);
viewModel可以通过这种方式创建,为什么还要用dagger注入呢.
另外有没有什么办法 可以减少module的数量啊 实在是太多了..
当开发者设置打开Don't keep Activities的时候。。。
切换程序会报这个错误
butterknife 在组件化中是怎么使用的,这个问题困惑我好久 !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.