rockyqu / mvpframes Goto Github PK
View Code? Open in Web Editor NEW整合大量主流开源项目并且可高度配置化的 Android MVP 快速集成框架,支持 AndroidX
Home Page: https://github.com/RockyQu/MVPFrames
License: Apache License 2.0
整合大量主流开源项目并且可高度配置化的 Android MVP 快速集成框架,支持 AndroidX
Home Page: https://github.com/RockyQu/MVPFrames
License: Apache License 2.0
1.首先感谢作者的辛苦付出,star和watch已点
2.希望下载模块能提供取消功能
3.同时本人自己也写了个取消功能,希望楼主不吝赐教(本人初级阶段)。
public class DownloadCoreCache {
private static Map<String,DownloadCore> downloadCoreMap = new HashMap<>();
private static DownloadCoreCache downloadCoreCache;
private DownloadCoreCache(){}
public static DownloadCoreCache getInstall(){
if(downloadCoreCache == null){
downloadCoreCache = new DownloadCoreCache();
}
return downloadCoreCache;
}
/***
* @param id : 任务id
* @param downloadCore
*/
public void put(String id,DownloadCore downloadCore){
synchronized (downloadCoreMap){
downloadCoreMap.put(id,downloadCore);
}
}
public DownloadCore get(String id){
synchronized (downloadCoreMap){
return downloadCoreMap.get(id);
}
}
public void remove(String id){
synchronized (downloadCoreMap){
downloadCoreMap.remove(id);
}
}
public void clearAll(){
synchronized (downloadCoreMap){
downloadCoreMap.clear();
}
}
}
public static CoreExecute init(Application application, DownloadRequest request, DownloadListener listener) {
DownloadCore downloadCore = new DownloadCore(application, request, listener);
DownloadCoreCache.getInstall().put(request.getId(),downloadCore);
return downloadCore;
}
public static void cancle(String id){
DownloadCoreCache.getInstall().get(id).cancle();
}
public void cancle() {
isCancle = true;
}
fos.write(buf, 0, len);
sum += len;
// Downloading
if (downloadListener != null) {
downloadListener.onProgress(sum, total);
}
if(isCancle){
break;
}
}
AS从2.3.3版本升级到3.0.1版本后报错,有解决方案吗?
有QQ群吗?
接口形式
@POST("server")
@Streaming
Call<ResponseEntity<CsResponse>> startup(@Body CsRequest request);
然后报转换错误
java.lang.ClassCastException: okhttp3.RequestBody$1 cannot be cast to okhttp3.FormBody
建议添加不同类型的兼容。
觉得您的项目挺不错的,希望您将此项目地址 Pull Request 到 https://github.com/JessYanCoding/MVPArms/blob/master/CONTRIBUTING_APP.md ,这样您也成为了 MVPArms 贡献者中的一员,还可以为此项目带来流量,MVPArms 还将继续成长变的更加强大,希望您一直坚持维护此项目✊
API 'variantOutput.getPackageLibrary()' is obsolete and has been replaced with 'variant.getPackageLibraryProvider()'.
It will be removed at the end of 2019.
@database(entities = {User.class, Bus.class}, version = 1)
public abstract class AppDatabase extends RoomDatabase {
public abstract UserDao userDao();
public abstract BusDao busDao();
public static AppDatabase get(AppComponent component) {
return (AppDatabase) component.dbManager().database();
}
}
@entity(tableName = "Bus")
public class Bus {
@PrimaryKey(autoGenerate = true)
private int ids;
@SerializedName("name")
String name;
public int getIds() {
return ids;
}
public void setIds(int ids) {
this.ids = ids;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
@entity(tableName = "User")
public class User {
@PrimaryKey(autoGenerate = true)
private int id;
// ID
@SerializedName("userId")
private String userId;
// 名字
@ColumnInfo(name = "name")
private String name;
// 排除这个字段,不存入数据库
@Ignore
Bitmap bitmap;
public User() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Bitmap getBitmap() {
return bitmap;
}
public void setBitmap(Bitmap bitmap) {
this.bitmap = bitmap;
}
}
我这样操作数据库,要抛出Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number. You can simply fix this by increasing the version number.这个异常。难道这个框架只能初始化一个类在AppDatabase 里面吗?可以qq联系你吗沟通一下这个心数据库的用法,我网上查了很多资料,都没发现什么原因导致的,有的说是数据库更新。感觉不是那么回事啊
没有看到作者在哪里通过AppComponent注入了数据库啊?只看到了一个DB.Module的提供的类 请指教一下是在哪里注入的?
看你代码好像没做这个操作啊
数据库为什么不用目前流行的greenDao,这个数据库不是很会用
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.