I have a TextView
which can be resized dinamically (I use setTextSize()
). It correctly expands and shrinks its bounds on Android 2.2. But on Android 3.1, when the text become smaller, the height of area is not shrink.
Here is the short video that demonstrates that.
The layout is just simple vertical LinearLayout
:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="0dip">
...
<TextView
android:id="@+id/track_number"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/tcTrackNo"
android:padding="5dp" />
...
<style name="tcTrackNo" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">@color/track_number</item>
</style>
So, what extra should be done to make the TextView
reduce its height accordingly to its font size on Honeycomb?
PS. Again, on Android 2.2 the text area collapses until the smallest height without any issue. The video how it's intended to work.