I'm creating a grid that displays values that change very often. Because of this, I'm using a TextView that autoresizes when its content changes (Auto Scale TextView Text to Fit within Bounds). The resize takes place, but the view doesn't layout properly
The thing is, when I examine the activity with HierarchyViewer the layout displays as I want.
My guess is that HierarchyViewer invokes requestLayout() or invalidate() on the view, but I've tried that with no success. This code is invoked in the main activity with no effect.
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
getWindow().getDecorView().requestLayout();
getWindow().getDecorView().invalidate();
}
}, 5000);
I've also tried invalidating the view after resizing.
The TextView has gravity set to Center, and if no resize takes place, it looks ok.
Any hint will be welcome, thanks in advance!