Workaround Spinner.Underlined not working in RTL on v21-22
We now continue using the compat style and assets in ldrtl
on v21 and v22.
BUG: 22960151
Change-Id: I19168957db3d5292ad286098c22c6a1dd45b02db
diff --git a/v7/appcompat/res/values-ldltr-v21/styles_base.xml b/v7/appcompat/res/values-ldltr-v21/styles_base.xml
new file mode 100644
index 0000000..57ebdba
--- /dev/null
+++ b/v7/appcompat/res/values-ldltr-v21/styles_base.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+
+ <!-- Like in themes_base.xml, the namespace "*.AppCompat.Base" is used to
+ define base styles for the platform version. The "*.AppCompat"
+ variants are for direct use or use as parent styles by the app. -->
+ <eat-comment/>
+
+ <!-- The platform Underlined style only works in LTR in v21-22 -->
+ <style name="Base.Widget.AppCompat.Spinner.Underlined" parent="android:Widget.Material.Spinner.Underlined" />
+
+</resources>
diff --git a/v7/appcompat/res/values-ldrtl-v23/styles_base.xml b/v7/appcompat/res/values-ldrtl-v23/styles_base.xml
new file mode 100644
index 0000000..cba56bd
--- /dev/null
+++ b/v7/appcompat/res/values-ldrtl-v23/styles_base.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+
+ <style name="Base.Widget.AppCompat.Spinner.Underlined" parent="android:Widget.Material.Spinner.Underlined" />
+
+</resources>
diff --git a/v7/appcompat/res/values-v21/styles_base.xml b/v7/appcompat/res/values-v21/styles_base.xml
index 649f0ca..f0c783e 100644
--- a/v7/appcompat/res/values-v21/styles_base.xml
+++ b/v7/appcompat/res/values-v21/styles_base.xml
@@ -113,7 +113,7 @@
<style name="Base.Widget.AppCompat.Spinner" parent="android:Widget.Material.Spinner" />
- <style name="Base.Widget.AppCompat.Spinner.Underlined" parent="android:Widget.Material.Spinner.Underlined" />
+ <!-- Base.Widget.AppCompat.Spinner.Underlined is overridden in ldltr-v21 and v23 -->
<style name="Base.Widget.AppCompat.ListView" parent="android:Widget.Material.ListView" />
<style name="Base.Widget.AppCompat.ListView.Menu" />