Skip to content

Commit 37e010c

Browse files
committed
修改文档
1 parent b356cf5 commit 37e010c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

form/src/main/java/com/bin/david/form/core/SmartTable.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class SmartTable<T> extends View implements OnTableChangeListener{
5454
private final Object lockObject = new Object();
5555
private boolean isExactly = true; //是否是测量精准模式
5656
private boolean isNotifying = false; //是否正在更新数据
57+
private boolean isYSequenceRight;
5758

5859
public SmartTable(Context context) {
5960
super(context);
@@ -126,14 +127,28 @@ protected void onDraw(Canvas canvas) {
126127
drawGridBackground(canvas, showRect, scaleRect);
127128
if (config.isShowYSequence()) {
128129
yAxis.onMeasure(scaleRect, showRect, config);
130+
if(isYSequenceRight){
131+
canvas.save();
132+
canvas.translate(showRect.width(),0);
133+
}
129134
yAxis.onDraw(canvas, showRect, tableData, config);
135+
if(isYSequenceRight){
136+
canvas.restore();
137+
}
130138
}
131139
if (config.isShowXSequence()) {
132140
xAxis.onMeasure(scaleRect, showRect, config);
133141
xAxis.onDraw(canvas, showRect, tableData, config);
134142

135143
}
144+
if(isYSequenceRight){
145+
canvas.save();
146+
canvas.translate(-yAxis.getWidth(),0);
147+
}
136148
provider.onDraw(canvas, scaleRect, showRect, tableData, config);
149+
if(isYSequenceRight){
150+
canvas.restore();
151+
}
137152
}
138153
}
139154
}
@@ -585,5 +600,13 @@ private void release(){
585600
xAxis = null;
586601
yAxis = null;
587602
}
603+
604+
public boolean isYSequenceRight() {
605+
return isYSequenceRight;
606+
}
607+
608+
public void setYSequenceRight(boolean YSequenceRight) {
609+
isYSequenceRight = YSequenceRight;
610+
}
588611
}
589612

0 commit comments

Comments
 (0)