smartTable icon indicating copy to clipboard operation
smartTable copied to clipboard

如何隐藏行号?如何在ScrollView嵌套里正常显示?

Open tumuyan opened this issue 7 years ago • 3 comments

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>

tim 20181014164311

tumuyan avatar Oct 14 '18 09:10 tumuyan

同问

z2700589 avatar Dec 10 '18 09:12 z2700589

同问

jupitar avatar Nov 18 '21 12:11 jupitar

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

jupitar avatar Nov 18 '21 13:11 jupitar