Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不会自动换行的bug解决方案 #24

Open
SherlockGougou opened this issue Mar 31, 2017 · 0 comments
Open

不会自动换行的bug解决方案 #24

SherlockGougou opened this issue Mar 31, 2017 · 0 comments

Comments

@SherlockGougou
Copy link

我在使用时,发现,listview加载完之后,tagview不会自动换行,看了一下源码,只需要在tagview下添加以下代码:

	public void setMaxWith(int width) {
		mWidth = width;
	}

并在使用tagview之前,调用此方法,设置一个tagview所占用的最大宽度,例如我的代码中,动态计算出宽度并设置即可:

int phoneWid = HomepageUtil.getPhoneWid();
mHolder.tag_describe.setMaxWith(phoneWid - HomepageUtil.dp2px(15 + 100 + 12 + 15));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant