Android 填坑突击队
1、遇到一个奇怪的问题,TextView.setText无效,但是getText确实能拿到修改后值
猜想主线程阻塞了,查了很久没找到原因
**最终原因:**我使用了style,在dimen里我定义了这个:
在style里我定制这个
解决:style不能写layout_width和layout_height为wrap_content,刷新数据会有问题
直接在布局写:
style="@style/ThemeTextKeyStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" /> 这样就没问题了