Obsolete
Status Update
Comments
ta...@gmail.com <ta...@gmail.com> #2
Here is a not cool workaround for this.
Somehow it works correctly when view has double byte content.
final String DOUBLE_BYTE_SPACE = "\u3000";
textView.append(DOUBLE_BYTE_SPACE);
textView.setTextSize(10);
Somehow it works correctly when view has double byte content.
final String DOUBLE_BYTE_SPACE = "\u3000";
textView.append(DOUBLE_BYTE_SPACE);
textView.setTextSize(10);
no...@gmail.com <no...@gmail.com> #3
I have a same issue. After text size is changed, height is not re-measured.
I found that if bufferType is spannable this bug is resolved somehow.(why??)
I think this is a critical bug for a lot of apps.
I found that if bufferType is spannable this bug is resolved somehow.(why??)
I think this is a critical bug for a lot of apps.
an...@trinode.co.uk <an...@trinode.co.uk> #4
Same issue here, it's driving me nuts. tried invalidate(), forceLayout() and requestLayout() all the way up the tree. **Something** is not being recalculated, but I don't know what. My main problem with this is the position of the text is well below where it should be if the text was a lot bigger before.
an...@trinode.co.uk <an...@trinode.co.uk> #5
pm...@android.com <pm...@android.com>
no...@gmail.com <no...@gmail.com> #6
I tested this issue on JellyBean emulator. It has been fixed.
Thanks.
Thanks.
ck...@gmail.com <ck...@gmail.com> #7
Fixed.
da...@gmail.com <da...@gmail.com> #8
Bug is still present on CM 10.1 (JB 4.2.2) on Samsung Galaxy S II. Could this be relevant?
kh...@gmail.com <kh...@gmail.com> #9
Hey,
I faced this issue on 5.0.1 too, and the fix was to set textview gravity to central vertical, hope this will help anyone
I faced this issue on 5.0.1 too, and the fix was to set textview gravity to central vertical, hope this will help anyone
Description
After TextView.setTextSize(), the TextView doesn't measure correct height.
The layout_height is set as "wrap_content" as below:
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello"
android:background="#FF0000FF" />
When "Big" button is clicked, TextView.setTextSize(100);
When "Small" button is clicked, TextView.setTextSize(10);
1. Click Big button
2. Click Small button.
The text size decreased, but height doesn't decreased.
Once the height is increased, it doesn't decreased again.
It works good in Gingerbread and Honeycomb.
Please check the attachment.