diff --git a/app/build.gradle b/app/build.gradle index 811ac8a..820de6f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -74,6 +74,8 @@ dependencies { implementation files('libs/wenote.jar') implementation 'com.github.bumptech.glide:glide:4.11.0' implementation 'com.lzy.net:okgo:3.0.4' + implementation 'com.blankj:utilcodex:1.30.5' + implementation 'com.google.code.gson:gson:2.8.6' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f1b4245..44a5173 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -19,3 +19,74 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +-flattenpackagehierarchy +-allowaccessmodification +-keepattributes Exceptions,InnerClasses,Signature,SourceFile,LineNumberTable +-dontskipnonpubliclibraryclassmembers +-ignorewarnings +#kotlin +-keep class kotlin.Metadata { *; } +-dontwarn kotlin.** +-keepclassmembers class **$WhenMappings { + ; +} +-keepclassmembers class kotlin.Metadata { + public ; +} +-assumenosideeffects class kotlin.jvm.internal.Intrinsics { + static void checkParameterIsNotNull(java.lang.Object, java.lang.String); +} + +-keepclasseswithmembernames class * { + native ; +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} +-keepclassmembers class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} +-keep class **.R$* {*;} +-keepclassmembers enum * { *;} + + + + +#Gson +-keepclassmembers public class com.google.gson.** +-keepclassmembers public class com.google.gson.** {public private protected *;} +-keepclassmembers public class com.project.mocha_patient.login.SignResponseData { private *; } +-keepclassmembers class sun.misc.Unsafe { *; } +-keep @interface com.google.gson.annotations.SerializedName +-keepclassmembers class * { + @com.google.gson.annotations.SerializedName ; +} + +#bean +-keep class com.yzx.webebook.model.** { *; } +-keep class com.yzx.webebook.model.Note { *; } +-keep class com.yzx.webebook.model.UploadBean { *; } +-keep class com.yzx.webebook.model.UploadContent { *; } + +-keep class **$Properties {*;} + +#Glide +-keep public class * implements com.bumptech.glide.module.GlideModule +-keep public class * extends com.bumptech.glide.module.AppGlideModule +-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { + **[] $VALUES; + public *; +} +# for DexGuard only +#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule +-dontwarn com.bumptech.glide.** + + +# ProGuard configurations for Bugtags +-keepattributes LineNumberTable,SourceFile +-dontwarn com.bugtags.library.** +-dontwarn io.bugtags.** +-dontwarn org.apache.http.** +-dontwarn android.net.http.AndroidHttpClient diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 28df13f..4b3e631 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -21,6 +21,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> + >() { WebActivity.active(this, editText.text.toString()) } btn4.setOnClickListener { - BookActivity.active(this,"教育云空间","f04be754f6cb3f6168f582403a514c39","filec","",1,1) + BookActivity.active( + this, + "教育云空间", + "f04be754f6cb3f6168f582403a514c39", + "filec", + "", + 1, + 1 + ) } btn5.setOnClickListener { - BookActivity.active(this,"教育云空间(无图)","","","",2,2) +// BookActivity.active(this,"教育云空间(无图)","","","",2,2) + val json ="" + NoteActivity.active(this, "测试笔记写字", json) } /*OkGo.post("https://fileupload.oa.qbjjyyun.net/edufile/fileUpload") @@ -75,16 +87,25 @@ class MainActivity : BaseActivity>() { override fun initPresenter(): BasePresenter<*>? = null @SuppressLint("SetTextI18n") - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) - if(requestCode==BookActivity.REQ_CODE&&resultCode== Activity.RESULT_OK){ + if (requestCode == BookActivity.REQ_CODE && resultCode == Activity.RESULT_OK) { val mKey = data?.getStringExtra("key") val mIdentity = data?.getStringExtra("identity") - val url = "https://$mIdentity.oa.qbjjyyun.net/edufile/imageView?uniqueKey=$mKey" - Glide.with(this) - .load(url) - .into(testImageView) + if(!TextUtils.isEmpty(mKey)&&!TextUtils.isEmpty(mIdentity)){ + + val url = "https://$mIdentity.oa.qbjjyyun.net/edufile/imageView?uniqueKey=$mKey" + Glide.with(this) + .load(url) + .into(testImageView) + } + val json = data?.getStringExtra("note_info")?:"" + backInfo.text = json + } + if (requestCode == NoteActivity.REQ_CODE && resultCode == Activity.RESULT_OK) { + val json = data?.getStringExtra("note_info")?:"" + backInfo.text = json } } } diff --git a/app/src/main/java/com/yzx/webebook/activity/NoteActivity.kt b/app/src/main/java/com/yzx/webebook/activity/NoteActivity.kt new file mode 100644 index 0000000..13f0f11 --- /dev/null +++ b/app/src/main/java/com/yzx/webebook/activity/NoteActivity.kt @@ -0,0 +1,646 @@ +package com.yzx.webebook.activity + +import android.Manifest +import android.annotation.SuppressLint +import android.app.Activity +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.content.pm.ActivityInfo +import android.content.pm.PackageManager +import android.graphics.Bitmap +import android.graphics.Rect +import android.graphics.drawable.Drawable +import android.os.Handler +import android.os.Message +import android.text.TextUtils +import android.util.Log +import android.view.KeyEvent +import android.view.View +import android.widget.Toast +import com.blankj.utilcode.util.FileUtils +import com.blankj.utilcode.util.GsonUtils +import com.blankj.utilcode.util.ImageUtils +import com.bumptech.glide.Glide +import com.bumptech.glide.load.engine.DiskCacheStrategy +import com.bumptech.glide.request.target.CustomTarget +import com.bumptech.glide.request.target.Target +import com.bumptech.glide.request.transition.Transition +import com.google.gson.Gson +import com.lzy.okgo.OkGo +import com.lzy.okgo.callback.StringCallback +import com.lzy.okgo.model.Response +import com.wetao.note.NotePageInfo +import com.wetao.note.WeNoteView +import com.wetao.note.WePoint +import com.yzx.webebook.R +import com.yzx.webebook.activity.base.BaseActivity +import com.yzx.webebook.model.Note +import com.yzx.webebook.presenter.base.BasePresenter +import kotlinx.android.synthetic.main.activity_note.* +import org.jetbrains.anko.startActivityForResult +import org.jetbrains.anko.toast +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.util.* +import kotlin.system.exitProcess + + +/** + * 笔记页面 + */ +class NoteActivity : BaseActivity>() { + + private val mBGDrawableList = intArrayOf( + R.drawable.background0, + R.drawable.background1, + R.drawable.background2, + R.drawable.background3, + R.drawable.background4, + R.drawable.background5, + R.drawable.background6, + R.drawable.background7, + R.drawable.background8, + R.drawable.background9, + R.drawable.background10 + ) + private var mBgId = 0 + private var mWePointList = mutableListOf() + private var mHandler = Handler() + private var mScreenH = 0 + private var mScreenW = 0 + private val MSG_SAVE_END = 2001 + private var mNotePageInfo: NotePageInfo? = null + private var notList = mutableListOf() + private var currKey = "" + private var currIndex = 0 + val TAG = "NoteActivity" + + + companion object { + const val NOTE_FOLDER_DIR = "/mnt/sdcard/ebook/" + const val REQ_CODE = 0x98 + fun active(act: Activity, title: String, noteInfo: String) { + act.startActivityForResult( + REQ_CODE, + "note_info" to noteInfo, + "title" to title + ) + } + } + + override val inflateId: Int + get() = R.layout.activity_note + + override fun initView() { + checkPermission() + requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT + + mScreenH = resources.displayMetrics.heightPixels + mScreenW = resources.displayMetrics.widthPixels + + //背景 + new_init.setOnClickListener { + note_view.setEnable(false) + mBgId++ + if (mBgId >= mBGDrawableList.size) { + mBgId = 0 + } + note_view.updateBackground(mBGDrawableList[mBgId]) + val note = notList[currIndex] + note.BGid = mBgId + } + //清除 + new_clear.setOnClickListener { + note_view.clear(); + } + //笔 + pen.setOnClickListener { + if (note_view.isEraserEnable) { + note_view.isEraserEnable = false + pen.setCompoundDrawablesWithIntrinsicBounds( + 0, + R.mipmap.ic_book_pen_select, + 0, + 0 + ) + new_eraser.setCompoundDrawablesWithIntrinsicBounds( + 0, + R.mipmap.ic_book_rubber, + 0, + 0 + ) + } + } + //橡皮 + new_eraser.setOnClickListener { + if (!note_view.isEraserEnable) { + note_view.isEraserEnable = true + pen.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.ic_book_pen, 0, 0) + new_eraser.setCompoundDrawablesWithIntrinsicBounds( + 0, + R.mipmap.ic_book_rubber_select, + 0, + 0 + ) + } + } + //加纸 + new_add.setOnClickListener { + notList.add(Note()) + tv_page_index.text = "${currIndex + 1}/${notList.size}" + indexBox.visibility = if (notList.size > 1) { + View.VISIBLE + } else { + View.GONE + } + } + //title + btnBack.setOnClickListener { onBackPressed() } + titleTv.text = intent.getStringExtra("title") + + //初始化笔记 + mWePointList.clear() + + //屏幕初始化 + val filter = IntentFilter() + filter.addAction(SCREEN_ON) + filter.addAction(SCREEN_OFF) + if (mReceiver != null) { + registerReceiver(mReceiver, filter) + } + + btnPre.setOnClickListener { + if (currIndex - 1 >= 0) { + ImageUtils.save( + note_view.currentNoteBitmap, + "${NOTE_FOLDER_DIR}/${currKey}.png", + Bitmap.CompressFormat.PNG + ) + loadImage(currIndex - 1) + } + } + + btnNext.setOnClickListener { + if (currIndex + 1 < notList.size) { + ImageUtils.save( + note_view.currentNoteBitmap, + "${NOTE_FOLDER_DIR}/${currKey}.png", + Bitmap.CompressFormat.PNG + ) + loadImage(currIndex + 1) + } + } + + saveBtn.setOnClickListener { + saveTip.visibility = View.VISIBLE + saveTip.text = "保存中..." + ImageUtils.save( + note_view.currentNoteBitmap, + "${NOTE_FOLDER_DIR}/${currKey}.png", + Bitmap.CompressFormat.PNG + ) + save(0) + } + } + + + @SuppressLint("SetTextI18n") + override fun initData() { + val json = intent.getStringExtra("note_info") + notList.clear() + if (!TextUtils.isEmpty(json)) { + val jsonArray = JSONArray(json) + if (jsonArray.length() > 0) { + for (index in 0 until jsonArray.length()) { + val jsonObj: JSONObject? = jsonArray?.opt(index) as JSONObject + val identity = jsonObj?.getString("identity"); + val key = jsonObj?.getString("key") + val bgId = jsonObj?.getInt("BGid") + val note = Note() + note.BGid = bgId ?: 0 + note.identity = identity ?: "" + note.key = key ?: "" + notList.add(note) + } + } else { + notList.add(Note()) + } + } else { + notList.add(Note()) + } + + Log.d(TAG, "初始化开始note_view") + note_view.post { + Log.d(TAG, "初始化开始note_view.post") + mHandler.post(mRunnable) + } + + tv_page_index.text = "1/${notList.size}" + indexBox.visibility = if (notList.size > 1) { + View.VISIBLE + } else { + View.GONE + } + } + + private fun loadImage(index: Int = 0) { + val note = notList[index] + val identity = note.identity + val key = note.key + val bgId = note.BGid + if (TextUtils.isEmpty(key)) { + note.key = Date().time.toString() + note_view.showExistPage( + "", + mBGDrawableList[0] + ) + currKey = note.key + currIndex = index + mBgId = bgId + tv_page_index.text = "${index + 1}/${notList.size}" + return + } + val path = "${NOTE_FOLDER_DIR}/${key}.png" + if (FileUtils.isFileExists(path)) { + if (mNotePageInfo == null) { + return + } + mBgId = bgId ?: 0 + note_view.showExistPage( + path, + mBGDrawableList[mBgId] + ) + currKey = key + currIndex = index + + tv_page_index.text = "${index + 1}/${notList.size}" + } else { + if (!TextUtils.isEmpty(key) && !TextUtils.isEmpty(identity)) { + saveTip.visibility = View.VISIBLE + saveTip.text = "加载中..." + val url = "https://${identity}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" + val customTarget: CustomTarget = object : CustomTarget() { + + override fun onLoadCleared(placeholder: Drawable?) {} + override fun onLoadFailed(errorDrawable: Drawable?) { + toast("文档加载失败!") + saveTip.visibility = View.GONE + } + + override fun onResourceReady( + resource: Drawable, + transition: Transition? + ) { + val bmp = ImageUtils.drawable2Bitmap(resource) + + ImageUtils.save(bmp, path, Bitmap.CompressFormat.PNG) + if (FileUtils.isFileExists(path)) { + if (mNotePageInfo == null) { + return + } + mBgId = bgId ?: 0 + note_view.showExistPage( + path, + mBGDrawableList[mBgId] + ) + currKey = key + currIndex = index + + tv_page_index.text = "${index + 1}/${notList.size}" + } + saveTip.visibility = View.GONE + } + } + Glide.with(this) + .load(url) + .diskCacheStrategy(DiskCacheStrategy.ALL) + .override( + Target.SIZE_ORIGINAL, + Target.SIZE_ORIGINAL + ) + .into(customTarget) + } else { + note.key = Date().time.toString() + note_view.showExistPage( + "", + mBGDrawableList[0] + ) + currKey = note.key + currIndex = index + mBgId = bgId ?: 0 + tv_page_index.text = "${index + 1}/${notList.size}" + } + } + } + + private fun save(index: Int) { + val item = notList[index] + val path = "${NOTE_FOLDER_DIR}/${item.key}.png" + + if (!TextUtils.isEmpty(item.key)) { + if (FileUtils.isFileExists(path)) { //存在就上传 + OkGo.post("https://fileupload.oa.qbjjyyun.net/edufile/fileUpload") + .tag(this) + .params("token", "0fc58a8df03c46d3f85b1047c4693cf6") + .params("user", Date().time) + .params("file", File(path)) + .execute(object : StringCallback() { + override fun onSuccess(response: Response) { + try { + val json = response.body() + Log.d("onSuccess", response.body()) + val jsonObject = JSONObject(json) + val content = jsonObject.optString("content") + Log.d("onSuccess,content", content) + val contentObject = JSONObject(content) + val key = contentObject.optString("key") + val identity = contentObject.optString("identity") + Log.d("onSuccess,identity", identity) + Log.d("onSuccess,key", key) + item.key = key + item.identity = identity + FileUtils.copy(path, "${NOTE_FOLDER_DIR}/${key}.png") + if (index == notList.size - 1) { + saveTip.visibility = View.GONE + toast("保存成功!") + backToH5() + } else { + save(index + 1) + } + } catch (e: Exception) { + } + } + + override fun onError(response: Response) { + super.onError(response) + toast("保存失败!") + } + + override fun onFinish() { + super.onFinish() + saveTip.visibility = View.GONE + } + }) + } else { + if (index == notList.size - 1) { + saveTip.visibility = View.GONE + toast("保存成功!") + backToH5() + } else { + save(index + 1) + } + } + + } else { + if (index == notList.size - 1) { + saveTip.visibility = View.GONE + toast("保存成功!") + backToH5() + } else { + save(index + 1) + } + } + + } + + private fun backToH5() { + val intent = Intent() + Log.d(TAG + "--------1------->", copyList().toString()) + Log.d(TAG + "---------2------>", Gson().toJson(copyList())) + Log.d(TAG + "---------3------>", GsonUtils.toJson(notList)) + intent.putExtra("note_info", GsonUtils.toJson(copyList())) + setResult(Activity.RESULT_OK, intent) + onBackPressed() + } + + private fun copyList(): MutableList { + val list = mutableListOf() + notList.forEach { + if(!TextUtils.isEmpty(it.key)&&!TextUtils.isEmpty(it.identity)){ + val item = Note() + item.key = it.key + item.identity = it.identity + item.BGid = it.BGid + list.add(item) + } + } + return list + } + + data class CopyNote(val key: String, val identity: String, val BGid: Int) + + override fun initPresenter(): BasePresenter<*>? = null + + private fun checkPermission() { + var isGranted = true + if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { + //如果没有写sd卡权限 + isGranted = false + } + if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { + isGranted = false + } + Log.i("cbs", "isGranted == $isGranted") + if (!isGranted) { + requestPermissions( + arrayOf( + Manifest.permission.ACCESS_COARSE_LOCATION, + Manifest.permission.ACCESS_FINE_LOCATION, + Manifest.permission.READ_EXTERNAL_STORAGE, + Manifest.permission.WRITE_EXTERNAL_STORAGE + ), + 102 + ) + } + } + + override fun onResume() { + note_view.setEnable(true) + note_view.setSleepMode(true) + super.onResume() + } + + override fun onPause() { + note_view.setEnable(false) + super.onPause() + } + + override fun onDestroy() { + //mView.exitView(); + mHandler.removeCallbacks(mRunnable) + note_view.exitNative() + if (mReceiver != null) { + unregisterReceiver(mReceiver) + mReceiver = null + } + super.onDestroy() + } + + override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { + if (keyCode == KeyEvent.KEYCODE_BACK) { + note_view.exitNative() + if (mReceiver != null) { + unregisterReceiver(mReceiver) + mReceiver = null + } + finish() + return true + } + return super.onKeyDown(keyCode, event) + } + + val SCREEN_ON = "android.intent.action.SCREEN_ON" + val SCREEN_OFF = "android.intent.action.SCREEN_OFF" + private var mReceiver: BroadcastReceiver? = object : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent) { + // 屏幕唤醒 + if (SCREEN_ON == intent.action) { + note_view.setSleepMode(true) + } else if (SCREEN_OFF == intent.action) { + note_view.setSleepMode(true) + } + } + } + + private val mRunnable: Runnable = object : Runnable { + override fun run() { + Log.d(TAG, "初始化开始-------------》"); + var count = 0 + while (note_view.height <= 0) { + try { + Thread.sleep(50) + } catch (e: InterruptedException) { + e.printStackTrace() + } + if (count++ > 40) { + Log.d(TAG, "Flash test : ++++++++ removeCallbacks"); + mHandler.removeCallbacks(this) + exitProcess(0) + } + } + //note_view.initNative(new Rect(mScreenW, mScreenH - note_view.getHeight(), 0, mScreenH), SAVE_PIC_PATH); + Log.d( + TAG, + "Flash test : ++++++++ mView.getHeight() = " + note_view.height + ", count = " + count + ); + note_view.initNative( + Rect( + mScreenW, + mScreenH - note_view.height, + 0, + mScreenH + ) + ) + note_view.setTouchEventHander(mPointHandler) + Log.d(TAG, "Flash test : ++++++ mRunnable() start loader notepageinfo"); + if (mNotePageInfo == null) { + mNotePageInfo = getNotePageInfo(NOTE_FOLDER_DIR) + } + if (mNotePageInfo == null) { + Log.d(TAG, "Flash test : +++++ no note, so init a page"); + initPage() + } + initNoteView() + loadImage(0) + + Log.d(TAG, "初始化结束-------------》"); + } + } + + private fun initNoteView() { + //写字板初始化 + note_view.background = null + note_view.penWidth = 3 + note_view.isEraserEnable = false + note_view.eraserWidth = 20 + } + + override fun finish() { + note_view.exitNative() + if (mReceiver != null) { + unregisterReceiver(mReceiver) + mReceiver = null + } + super.finish() + } + + override fun onBackPressed() { + note_view.exitNative() + if (mReceiver != null) { + unregisterReceiver(mReceiver) + mReceiver = null + } + super.onBackPressed() + } + + private fun initPage(): Boolean { + var file = File(NOTE_FOLDER_DIR) + if (!file.exists()) { + if (!FileUtils.createOrExistsDir(file)) { + return false + } + } + var notePath: String? = null + file = File("$NOTE_FOLDER_DIR/${currKey}.png") + if (file.exists()) { + notePath = "$NOTE_FOLDER_DIR/${currKey}.png" + } + mNotePageInfo = NotePageInfo(notePath, mBgId) + return true + } + + private fun loadOldPage() { + if (mNotePageInfo == null) { + return + } + mBgId = mNotePageInfo?.drwId ?: 0 + note_view.showExistPage( + mNotePageInfo?.notePath, + mBGDrawableList[mBgId] + ) + } + + //从笔记文件夹中读取当前笔记的页面信息 + private fun getNotePageInfo(path: String): NotePageInfo? { + + var file = File(path) + if (!file.exists()) { + return null + } + file.listFiles() ?: return null + val info = NotePageInfo(null, 0) + val notePath = "$path/${currKey}.png" + file = File(notePath) + if (file.exists()) { + info.notePath = notePath + } + info.drwId = 0 //Integer.parseInt(drwId); + return info + } + + private val mPointHandler: Handler = @SuppressLint("HandlerLeak") + object : Handler() { + override fun handleMessage(msg: Message) { + val what = msg.what + //同步获取的笔记点坐标信息msg + if (what == WeNoteView.TOUCH_EVENT) { + val point = msg.obj as WePoint + mWePointList.add(point) + } + + //保存笔记结束msg + if (what == MSG_SAVE_END) { + val status = msg.arg1 + if (status > 0) { //保存成功 + Toast.makeText(applicationContext, "保存成功!", Toast.LENGTH_SHORT).show(); + } else { //保存失败 + Toast.makeText(applicationContext, "保存失败!", Toast.LENGTH_SHORT) + .show(); + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/yzx/webebook/activity/WebActivity.kt b/app/src/main/java/com/yzx/webebook/activity/WebActivity.kt index 33c9fa3..91c2b04 100644 --- a/app/src/main/java/com/yzx/webebook/activity/WebActivity.kt +++ b/app/src/main/java/com/yzx/webebook/activity/WebActivity.kt @@ -231,6 +231,11 @@ class WebActivity : BaseActivity>() { obj.put("type", data?.getIntExtra("type", 1)) evaluateJavascript("onImageUploadSuccess", obj.toString()) } + + if (requestCode == NoteActivity.REQ_CODE && resultCode == Activity.RESULT_OK) { + val json = data?.getStringExtra("note_info")?:"" + evaluateJavascript("onImageUploadSuccess", json) + } } } @@ -259,6 +264,19 @@ class YzxJavascriptInterface(var ctx: Activity) { BookActivity.active(ctx, title, key, identity, name, index, type) } + /** + * 跳转到笔记页面 + * @param title 展示的title + * @param note_info 笔记得json,新的笔记 传"" ,老的笔记 传 [{"BGid":0,"identity":"fileb","key":"a92511a457cdc444bb274e5dee29c487"}] + */ + @JavascriptInterface + fun notePage( + title: String, + note_info:String + ) { + NoteActivity.active(ctx, title, note_info) + } + /** * 提示 */ diff --git a/app/src/main/java/com/yzx/webebook/model/Note.kt b/app/src/main/java/com/yzx/webebook/model/Note.kt new file mode 100644 index 0000000..f6fe42b --- /dev/null +++ b/app/src/main/java/com/yzx/webebook/model/Note.kt @@ -0,0 +1,7 @@ +package com.yzx.webebook.model + +class Note { + var key:String = "" + var identity:String = "" + var BGid:Int = 0 +} \ No newline at end of file diff --git a/app/src/main/res/drawable/save_bg.xml b/app/src/main/res/drawable/save_bg.xml new file mode 100644 index 0000000..dcfd28c --- /dev/null +++ b/app/src/main/res/drawable/save_bg.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_book.xml b/app/src/main/res/layout/activity_book.xml index 99ccd7b..0f802ee 100644 --- a/app/src/main/res/layout/activity_book.xml +++ b/app/src/main/res/layout/activity_book.xml @@ -159,6 +159,28 @@ android:textColor="#000" android:paddingVertical="10dp"/> + + + +