Commit e7c637e5 by 霍志良

feat:保留草稿

parent 44a36e43
...@@ -249,4 +249,5 @@ dependencies { ...@@ -249,4 +249,5 @@ dependencies {
implementation rootProject.ext.dependencies["retrofit-url-manager"] implementation rootProject.ext.dependencies["retrofit-url-manager"]
kapt 'com.alibaba:arouter-compiler:1.2.2' kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'androidx.fragment:fragment:1.2.4@aar'
} }
...@@ -35,7 +35,7 @@ ext { ...@@ -35,7 +35,7 @@ ext {
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.22",
//第一步 //第一步
"ydl-platform" : "0.0.40.96", "ydl-platform" : "0.0.40.98",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.61", "ydl-webview" : "0.0.38.61",
...@@ -119,7 +119,7 @@ ext { ...@@ -119,7 +119,7 @@ ext {
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.22",
//第一步 //第一步
"ydl-platform" : "0.0.40.96", "ydl-platform" : "0.0.40.98",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.61", "ydl-webview" : "0.0.38.61",
......
...@@ -9,8 +9,8 @@ class DynamicDraftBean ( ...@@ -9,8 +9,8 @@ class DynamicDraftBean (
var content:String?=null, var content:String?=null,
var topicid:String?=null, var topicid:String?=null,
var topicTitle:String?=null, var topicTitle:String?=null,
var isExpertSeen:Boolean?=false, var isExpertSeen:Int?=0,
var isUserAnonymous:Boolean?=false, var isUserAnonymous:Int?=0,
var publishTrendImgs: List<ParcelableImage> ?= null var publishTrendImgs: List<ParcelableImage> ?= null
) : Parcelable { ) : Parcelable {
constructor(parcel: Parcel) : this( constructor(parcel: Parcel) : this(
...@@ -18,8 +18,8 @@ class DynamicDraftBean ( ...@@ -18,8 +18,8 @@ class DynamicDraftBean (
parcel.readString(), parcel.readString(),
parcel.readString(), parcel.readString(),
parcel.readString(), parcel.readString(),
parcel.readValue(Boolean::class.java.classLoader) as? Boolean, parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.readValue(Boolean::class.java.classLoader) as? Boolean, parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.createTypedArrayList(ParcelableImage.CREATOR) parcel.createTypedArrayList(ParcelableImage.CREATOR)
) { ) {
} }
......
...@@ -7,7 +7,6 @@ import android.app.Activity; ...@@ -7,7 +7,6 @@ import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Point; import android.graphics.Point;
import android.graphics.Rect; import android.graphics.Rect;
import android.os.Build; import android.os.Build;
...@@ -16,7 +15,6 @@ import android.os.Handler; ...@@ -16,7 +15,6 @@ import android.os.Handler;
import android.os.Parcelable; import android.os.Parcelable;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
...@@ -46,7 +44,6 @@ import com.tencent.mmkv.MMKV; ...@@ -46,7 +44,6 @@ import com.tencent.mmkv.MMKV;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.adapter.custom.PublishImageAdapter;
import com.ydl.ydlcommon.actions.imagepicker.YDLImagePicker; import com.ydl.ydlcommon.actions.imagepicker.YDLImagePicker;
import com.ydl.ydlcommon.base.BaseActivity; import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.base.BaseApp; import com.ydl.ydlcommon.base.BaseApp;
...@@ -64,6 +61,7 @@ import com.yidianling.common.tools.RxFileTool; ...@@ -64,6 +61,7 @@ import com.yidianling.common.tools.RxFileTool;
import com.yidianling.dynamic.BuildConfig; import com.yidianling.dynamic.BuildConfig;
import com.yidianling.dynamic.bean.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.DynamicDraftBean;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity; import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity;
import com.yidianling.dynamic.common.emoji.EmoticonPickerView; import com.yidianling.dynamic.common.emoji.EmoticonPickerView;
import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener; import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener;
...@@ -228,7 +226,15 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie ...@@ -228,7 +226,15 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
public void onEventMainThread(DynamicSaveEvent event) { public void onEventMainThread(DynamicSaveEvent event) {
//保留草稿数据 标题、内容、话题、是否专家可见、是否匿名、图片 //保留草稿数据 标题、内容、话题、是否专家可见、是否匿名、图片
// MMKV.defaultMMKV().encode()
MMKV.defaultMMKV().encode("dynamic_save",new DynamicDraftBean(publish_trend_title_editext.getText().toString(),
publish_trend_content_editext.getText().toString(),
topic_id,
topic_title,
isDoctorShow,
is_niming,
publishTrendImgs
));
} }
@Override @Override
public void initDataAndEventLazy() { public void initDataAndEventLazy() {
......
...@@ -26,7 +26,6 @@ android { ...@@ -26,7 +26,6 @@ android {
targetSdkVersion rootProject.ext.android["targetSdkVersion"] targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
javaCompileOptions { javaCompileOptions {
......
...@@ -146,7 +146,7 @@ dependencies { ...@@ -146,7 +146,7 @@ dependencies {
api rootProject.ext.dependencies["support-multidex"] api rootProject.ext.dependencies["support-multidex"]
api rootProject.ext.dependencies["tablayout"] api rootProject.ext.dependencies["tablayout"]
api rootProject.ext.dependencies["xrecyclerview"] api rootProject.ext.dependencies["xrecyclerview"]
api rootProject.ext.dependencies["mmkv"] implementation rootProject.ext.dependencies["mmkv"]
api rootProject.ext.dependencies["flowlayout"] api rootProject.ext.dependencies["flowlayout"]
api rootProject.ext.dependencies["androidanimations"] api rootProject.ext.dependencies["androidanimations"]
//====================Tools==================== //====================Tools====================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment