FormLayoutManager首页,里面有github地址
目录
前言
认真看过FormLayoutManager完整的代码的朋友们,应该发现有一个startShow的方法。我们的表格默认起始显示左上角的位置,而这个方法就是提供让大家设置默认起始显示位置最右边或最底部或最右底部。
public void startShow(@StartShowType int type){
mStartShowType = type;
}
看代码就知道我们只能传StartShowType的值,这个FormLayoutManager内部的一个接口,可以看到,我只提供右边和底部的值。
public @interface StartShowType {
// 右边
int RIGHT = 1 << 1;
// 底部
int BOTTOM = 1 << 2;
}
使用
打开demo的TestFormActivity,找到startShow的代码
// 起始位置滚动到右底部
mLayoutManager.startShow(FormLayoutManager.StartShowType.RIGHT | FormLayoutManager.StartShowType.BOTTOM);
要滚到右下角ÿ