SetupWizardLibrary/library/test/instrumentation/res/values/styles.xml
Maurice Lam e2a8d27c2a Add theme fallback
- Add FallbackThemeWrapper, which behaves like ContextThemeWrapper,
  except that the base context's theme attributes takes precedence
  over the wrapper context's.
- Use the FallbackThemeWrapper in TemplateLayout (SetupWizardLayout
  and GlifLayout), so that inflating them with the wrong theme will
  not crash, but rather look wrong.

This allows SuwLib to add required attributes without risking
crashing clients that for some reason doesn't use the right themes.

Test: ./gradlew connectedAndroidTest
Change-Id: I694ad7279ce733659f6aa5d72e2087a09d3f1e22
2017-02-17 15:57:24 -08:00

31 lines
1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 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="TestBaseTheme">
<item name="android:background">#ffff0000</item>
<item name="android:theme">@style/TestBaseTheme</item>
</style>
<style name="TestFallbackTheme">
<item name="android:foreground">#ff0000ff</item>
<item name="android:theme">@style/TestFallbackTheme</item>
</style>
</resources>