Commit e7c637e5 by 霍志良

feat:保留草稿

parent 44a36e43
......@@ -249,4 +249,5 @@ dependencies {
implementation rootProject.ext.dependencies["retrofit-url-manager"]
kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'androidx.fragment:fragment:1.2.4@aar'
}
......@@ -35,7 +35,7 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.40.96",
"ydl-platform" : "0.0.40.98",
//第二步 若干
"ydl-webview" : "0.0.38.61",
......@@ -119,7 +119,7 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.40.96",
"ydl-platform" : "0.0.40.98",
//第二步 若干
"ydl-webview" : "0.0.38.61",
......
......@@ -9,8 +9,8 @@ class DynamicDraftBean (
var content:String?=null,
var topicid:String?=null,
var topicTitle:String?=null,
var isExpertSeen:Boolean?=false,
var isUserAnonymous:Boolean?=false,
var isExpertSeen:Int?=0,
var isUserAnonymous:Int?=0,
var publishTrendImgs: List<ParcelableImage> ?= null
) : Parcelable {
constructor(parcel: Parcel) : this(
......@@ -18,8 +18,8 @@ class DynamicDraftBean (
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.createTypedArrayList(ParcelableImage.CREATOR)
) {
}
......
......@@ -7,7 +7,6 @@ import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Build;
......@@ -16,7 +15,6 @@ import android.os.Handler;
import android.os.Parcelable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog;
......@@ -46,7 +44,6 @@ import com.tencent.mmkv.MMKV;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
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.base.BaseActivity;
import com.ydl.ydlcommon.base.BaseApp;
......@@ -64,6 +61,7 @@ import com.yidianling.common.tools.RxFileTool;
import com.yidianling.dynamic.BuildConfig;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.DynamicDraftBean;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity;
import com.yidianling.dynamic.common.emoji.EmoticonPickerView;
import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener;
......@@ -228,7 +226,15 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
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
public void initDataAndEventLazy() {
......
......@@ -26,7 +26,6 @@ android {
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
javaCompileOptions {
......
......@@ -146,7 +146,7 @@ dependencies {
api rootProject.ext.dependencies["support-multidex"]
api rootProject.ext.dependencies["tablayout"]
api rootProject.ext.dependencies["xrecyclerview"]
api rootProject.ext.dependencies["mmkv"]
implementation rootProject.ext.dependencies["mmkv"]
api rootProject.ext.dependencies["flowlayout"]
api rootProject.ext.dependencies["androidanimations"]
//====================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