smartTable
smartTable copied to clipboard
如何隐藏行号?如何在ScrollView嵌套里正常显示?
1.有没有方法隐藏每行的行号? 2.布局结构如图,smarttable已经设置了wrap_content, 但是并没有展开显示全部内容,y方向还是需要在table内滚动,而不是直接在scrollview里滚动。 怎么做才能让表格显示全部内容呢? 或者有什么方法可以获得所有行的总高度,这样我去重新给smarttable直接设置高度?
谢谢
<TableLayout...>
<com.bin.david.form.core.SmartTable
android:id="@+id/table"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
</LinearLayout>

同问
同问
table.post(() -> { int tableHeight = table.getTableData().getTableInfo().getTableRect().bottom; LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) table.getLayoutParams(); params.height = tableHeight + 60; table.setLayoutParams(params); }); 可以试试这个,但是最好加一下延迟。亲测有效