Fix toolbar text direction for RTL.
- Since the text view extends beyond the text, relying on the default
text direction would place the text to the left side of screen if a
non-localized string is used as the toolbar title.
Before the change: https://screenshot.googleplex.com/fFELQWWuuDX
After the change: https://screenshot.googleplex.com/mHcvMX8v193
Bug: 151359161
Bug: 150957534
Test: Manual
Change-Id: I42fc2720e7027a30a36d8e3db10cabf6bc8fd77f
diff --git a/car-ui-lib/res/values/styles.xml b/car-ui-lib/res/values/styles.xml
index f29274e..92abebb 100644
--- a/car-ui-lib/res/values/styles.xml
+++ b/car-ui-lib/res/values/styles.xml
@@ -51,6 +51,7 @@
<style name="Widget.CarUi.Toolbar.Title">
<item name="android:layout_marginStart">@dimen/car_ui_toolbar_title_margin_start</item>
<item name="android:textAppearance">@style/TextAppearance.CarUi.Widget.Toolbar.Title</item>
+ <item name="android:textDirection">locale</item>
</style>
<style name="Widget.CarUi.Toolbar.TextButton" parent="Widget.CarUi.Button.Borderless.Colored">