Fix bug #12422326 Unable to change text direction programmatically using setTextDirection Android SDK API

- force TextView internal layout recreation when its TextDirection is changed

Change-Id: I7d6b088a9235362e03cb6694392df71bbf5a323a
This commit is contained in:
Fabrice Di Meglio
2014-01-06 16:30:43 -08:00
parent dcd8258e24
commit 22228fec05

View File

@@ -8670,6 +8670,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
super.onRtlPropertiesChanged(layoutDirection);
mTextDir = getTextDirectionHeuristic();
if (mLayout != null) {
checkForRelayout();
}
}
TextDirectionHeuristic getTextDirectionHeuristic() {