aoi-hosizora / biji_baibuti Goto Github PK
View Code? Open in Web Editor NEWSCUT Baibuti Project - Biji
License: Apache License 2.0
SCUT Baibuti Project - Biji
License: Apache License 2.0
重点
新建完笔记后还没返回主界面就进行更改,未能正常同步。
禁用横屏,显示报错。
更改分组中加入修改分组入口。
标题多行问题。
搜索完后在本页面加入文本提示。
空笔记未保存进入详细信息提醒保存后自动跳出本活动。
详细信息添加具体分类信息和保存前字样。
笔记信息隐藏img标签
canvas.drawRect
绘制结果特别粗糙,待改@Override
protected void onDraw(Canvas canvas) {
// canvas.save();
mPaint.setColor(BorderColor);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeWidth(BorderWidth);
mPaint.setAntiAlias(true);
canvas.drawRect(0, 0, getWidth(), getHeight(), mPaint);
canvas.setDrawFilter(mPaintFlagsDrawFilter);
super.onDraw(canvas);
}
C和S的数据同步问题
ServerErrorException
(不更新Log)ServerErrorException
/**
* 异步识别文字
* @param bitmap 图片路径
*/
private void idenWordsSync(final Bitmap bitmap) {
idenLoadingDialog = new ProgressDialog(ModifyNoteActivity.this);
idenLoadingDialog.setTitle(R.string.MNoteActivity_OCRSyncAlertTitle);
idenLoadingDialog.setMessage(getResources().getString(R.string.MNoteActivity_OCRSyncAlertMsg));
class HasDismiss {
private boolean dismiss = false;
HasDismiss() {}
void setDismiss() { this.dismiss = true; }
boolean getDismiss() { return this.dismiss; }
}
final HasDismiss isHasDismiss = new HasDismiss();
final Observable<String> mObservable = Observable.create(new ObservableOnSubscribe<String>() {
@Override
public void subscribe(ObservableEmitter<String> emitter) throws Exception {
// 识别 ExtractUtil.recognition <<< 异步
final String extaText = ExtractUtil.recognition(bitmap, ModifyNoteActivity.this);
emitter.onNext(extaText); // 处理识别后响应
emitter.onComplete(); // 完成
}
})
.subscribeOn(Schedulers.io()) //生产事件在io
.observeOn(AndroidSchedulers.mainThread()); //消费事件在UI线程
idenLoadingDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) { ////////// 待改
// Toast.makeText(ModifyNoteActivity.this, "d", Toast.LENGTH_SHORT).show();
// ExtractUtil.tessBaseAPI.clear();
// mObservable.onTerminateDetach();
isHasDismiss.setDismiss();
}
});
idenLoadingDialog.show();
mObservable.subscribe(new Observer<String>() {
@Override
public void onComplete() {
}
@Override
public void onError(Throwable e) {
if (idenLoadingDialog != null && idenLoadingDialog.isShowing()) {
idenLoadingDialog.dismiss();
}
Toast.makeText(ModifyNoteActivity.this, R.string.MNoteActivity_OCRSyncAlertError, Toast.LENGTH_SHORT).show();
}
@Override
public void onSubscribe(Disposable d) {
subsInsert = d;
}
// 识别后的处理
@Override
public void onNext(final String extaText) {
// 关闭进度条
if (idenLoadingDialog != null && idenLoadingDialog.isShowing()) {
idenLoadingDialog.dismiss();
}
// 处理回显
ShowLogE("idenWordsSync.onNext()", isHasDismiss.getDismiss() + "");
if (!isHasDismiss.getDismiss()) // GOMI Code
idenWordsNextReturn(extaText);
}
});
}
因为搜索的时候用了新的List
https://blog.csdn.net/swust_zeng_zhuo_k/article/details/80354236
AlertDialog
部分 Positive
写漏OnlineDataMgr
类和对应数据库表,记录同步信息View
设置OCRAct
的 BoderlessButton
颜色不一致NoteFrag
的 FloatingButton
实现看尽可能修改NoteList.remove(note);
noteAdapter.notifyDataSetChanged();
// TODO 一堆垃圾代码待改
if (IsSearching)
noteAdapter.setmNotes(search(SearchingStr));
else if (IsGrouping)
noteAdapter.setmNotes(getGroupOfNote(currGroup));
else
noteAdapter.setmNotes(NoteList);
noteAdapter.notifyDataSetChanged();
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.