android-thinkmap-treeview icon indicating copy to clipboard operation
android-thinkmap-treeview copied to clipboard

能修改上下的间距吗

Open wl532882877 opened this issue 3 years ago • 3 comments

整个树状图 上下的距离可以设置高度吗

wl532882877 avatar Mar 23 '22 06:03 wl532882877

使用View的padding应该可以

guaishouN avatar Mar 24 '22 08:03 guaishouN

使用View的padding应该可以

你好可不可以详细说明一下, 比如我现在在一个LinearLayout (orientation="vertical")里面写了一个 GysoTreeView(高度和宽度是自适应的),然后下面还有很多控件,但是GysoTreeView占的高度太高了,导致和下一个控件之间有一块很大的空白,这个空白就是 GysoTreeView的高度,能否有地方去设置GysoTreeView的总体高度呢

wl532882877 avatar Mar 29 '22 03:03 wl532882877

使用View的padding应该可以

你好可不可以详细说明一下, 比如我现在在一个LinearLayout (orientation="vertical")里面写了一个 GysoTreeView(高度和宽度是自适应的),然后下面还有很多控件,但是GysoTreeView占的高度太高了,导致和下一个控件之间有一块很大的空白,这个空白就是 GysoTreeView的高度,能否有地方去设置GysoTreeView的总体高度呢

在TreeViewContainer的onMeasure里ViewBox viewBox = mTreeLayoutManager.getTreeLayoutBox();为计算获得的树状图宽高,你可以在onMeasure里修改适应。 其中是这里生效 int specWidth = MeasureSpec.makeMeasureSpec(Math.max(winWidth, viewBox.getWidth()), MeasureSpec.EXACTLY); int specHeight = MeasureSpec.makeMeasureSpec(Math.max(winHeight,viewBox.getHeight()),MeasureSpec.EXACTLY);

guaishouN avatar Apr 06 '22 06:04 guaishouN