Skip to content

Commit

Permalink
修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyanbin committed Mar 11, 2018
1 parent b356cf5 commit 37e010c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions form/src/main/java/com/bin/david/form/core/SmartTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class SmartTable<T> extends View implements OnTableChangeListener{
private final Object lockObject = new Object();
private boolean isExactly = true; //是否是测量精准模式
private boolean isNotifying = false; //是否正在更新数据
private boolean isYSequenceRight;

public SmartTable(Context context) {
super(context);
Expand Down Expand Up @@ -126,14 +127,28 @@ protected void onDraw(Canvas canvas) {
drawGridBackground(canvas, showRect, scaleRect);
if (config.isShowYSequence()) {
yAxis.onMeasure(scaleRect, showRect, config);
if(isYSequenceRight){
canvas.save();
canvas.translate(showRect.width(),0);
}
yAxis.onDraw(canvas, showRect, tableData, config);
if(isYSequenceRight){
canvas.restore();
}
}
if (config.isShowXSequence()) {
xAxis.onMeasure(scaleRect, showRect, config);
xAxis.onDraw(canvas, showRect, tableData, config);

}
if(isYSequenceRight){
canvas.save();
canvas.translate(-yAxis.getWidth(),0);
}
provider.onDraw(canvas, scaleRect, showRect, tableData, config);
if(isYSequenceRight){
canvas.restore();
}
}
}
}
Expand Down Expand Up @@ -585,5 +600,13 @@ private void release(){
xAxis = null;
yAxis = null;
}

public boolean isYSequenceRight() {
return isYSequenceRight;
}

public void setYSequenceRight(boolean YSequenceRight) {
isYSequenceRight = YSequenceRight;
}
}

0 comments on commit 37e010c

Please sign in to comment.