FinleyLC

Results 6 comments of FinleyLC

兄弟你再主线程做耗时操作也有风险吧。 new Thread 保留,可以加个线程锁 拷贝并新建一个SmartTable 修改刷新方法 /** * 通知更新 */ public void notifyDataChanged() { if (tableData != null) { config.setPaint(paint); //开启线程 new Thread(this::notifyDataChangedSafe).start(); } } //加个锁,不加锁情况下每两次调用需要间隔一点时间,不允许连续调用两次,否则会有线程问题 private synchronized void notifyDataChangedSafe()...

上次贴漏了,把这行加上,就不用点一下了 /** * 通知重绘 * 增加锁机制,避免闪屏和数据更新异常 */ @Override public void invalidate() { // if (!isNotifying.get()) { super.invalidate(); // } }

问题4:比如统计¥100.5这种字段可以自定义一个ICountFormat来实现: colum1.setCountFormat(new StringRMBCountFormat()); public class StringRMBCountFormat implements ICountFormat { private double totalCount = 0.0d; @Override public void count(T t) { if (t instanceof String) { String value = (String) t;...

你应该是间隔时间很短的情况下,调用了两次刷新数据,导致数据有问题,可以加个线程锁 拷贝并新建一个SmartTable 修改刷新方法 /** * 通知更新 */ public void notifyDataChanged() { if (tableData != null) { config.setPaint(paint); //开启线程 new Thread(this::notifyDataChangedSafe).start(); } } //加个锁,不加锁情况下每两次调用需要间隔一点时间,不允许连续调用两次,否则会有线程问题 private synchronized void notifyDataChangedSafe() { isNotifying.set(true); parser.parse(tableData);...

well...I just copy all the tspl-package code into my new project. Beacause I can't sync your sample by Android Studio 3.4.2. I don't know how to use these under codes...

#SmartTable -keepattributes *Annotation* -keepclassmembers class ** { @com.bin.david.form.annotation.SmartTable; } -keep enum com.bin.david.form.annotation.ColumnType { *; }