From 65a6bde49652558ada5daa15eca03d5061465a00 Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期五, 27 十二月 2024 18:00:46 +0800 Subject: [PATCH] 1.图片上传进度相关代码。 2.修复地图定位图标不居中问题。 --- app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java | 57 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 46 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java b/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java index 2980e4b..9b8f46d 100644 --- a/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java +++ b/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java @@ -1,6 +1,7 @@ package com.dayu.pipirrapp.bean.net; import com.dayu.pipirrapp.net.BaseResponse; +import com.luck.picture.lib.entity.LocalMedia; import retrofit2.Call; @@ -10,13 +11,47 @@ * Date: 2023-04-15 8:15 * Description: */ -public class UplodFileState { - int state = 0;//0姝e湪涓婁紶 1涓婁紶瀹屾垚 2涓婁紶澶辫触 - String filePath;//涓婁紶鐨勬枃浠� - int number;//澶辫触鍚庨噸璇曠殑娆℃暟 - String id;//涓婁紶鍚庣殑id - String webPath;//涓婁紶鍚庣殑鍦板潃 - Call<BaseResponse> thisCall;//褰撳墠璇锋眰 +public class UplodFileState extends LocalMedia { + //姝e湪涓婁紶 + public final static int STATE_UPDING = 0; + //涓婁紶瀹屾垚 + public final static int STATE_DONE = 1; + //涓婁紶澶辫触 + public final static int STATE_ERROR = 2; + + //0姝e湪涓婁紶 1涓婁紶瀹屾垚 2涓婁紶澶辫触 + int state = 0; + //涓婁紶鐨勬枃浠� + String filePath; + //澶辫触鍚庨噸璇曠殑娆℃暟 + int number; + //涓婁紶鍚庣殑id + String postId; + //涓婁紶鍚庣殑鍦板潃 + String webPath; + //褰撳墠璇锋眰 + Call<BaseResponse> thisCall; + //鍥剧墖涓婁紶杩涘害 + int progress; + //adapter涓殑position + int adapterPosition = -1; + + public int getAdapterPosition() { + return adapterPosition; + } + + public void setAdapterPosition(int adapterPosition) { + this.adapterPosition = adapterPosition; + } + + public int getProgress() { + return progress; + } + + public void setProgress(int progress) { + this.progress = progress; + } + public Call<BaseResponse> getThisCall() { return thisCall; @@ -54,12 +89,12 @@ this.filePath = filePath; } - public String getId() { - return id; + public String getPostId() { + return postId; } - public void setId(String id) { - this.id = id; + public void setPostId(String postId) { + this.postId = postId; } public String getWebPath() { -- Gitblit v1.8.0