fix: 首次提交
This commit is contained in:
112
setupcompat/main/res/values/attrs.xml
Normal file
112
setupcompat/main/res/values/attrs.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 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>
|
||||
|
||||
<!-- Theme attributes -->
|
||||
<attr name="sucLayoutTheme" format="reference" />
|
||||
|
||||
<declare-styleable name="SucTemplateLayout">
|
||||
<attr name="android:layout" />
|
||||
<attr name="sucContainer" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="SucPartnerCustomizationLayout">
|
||||
<attr name="sucLayoutFullscreen" format="boolean" />
|
||||
<!-- When set to false, prevents the layout applying partner resource. This attribute is
|
||||
particularly useful when the layout would like to apply their customized attributes.
|
||||
This attribute will be ignored and use partner resource when inside setup wizard flow.
|
||||
The default value is true. -->
|
||||
<attr name="sucUsePartnerResource" format="boolean" />
|
||||
<attr name="sucFullDynamicColor" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Status bar attributes; only takes effect on M or above -->
|
||||
<declare-styleable name="SucStatusBarMixin">
|
||||
<!-- The color for the status bar. For this to take effect,
|
||||
"android:windowDrawsSystemBarBackgrounds" should be set to true and
|
||||
"android:windowTranslucentStatus" should be set to false. Also,
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN should be set to true and
|
||||
android:statusBarColor should be transparent. -->
|
||||
<attr name="sucStatusBarBackground" format="color|reference" />
|
||||
<attr name="sucLightStatusBar" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- System navigation bar attributes; only takes effect on O_MR1 or above -->
|
||||
<declare-styleable name="SucSystemNavBarMixin">
|
||||
<!-- The color for the system navigation bar. For this to take effect,
|
||||
"android:windowDrawsSystemBarBackgrounds" should be set to true and
|
||||
"android:windowTranslucentNavigation" should be set to false. -->
|
||||
<attr name="sucSystemNavBarBackgroundColor" format="color" />
|
||||
<attr name="sucLightSystemNavBar" format="boolean" />
|
||||
<!-- The color for the system navigation bar divider. For this to take effect,
|
||||
"android:windowDrawsSystemBarBackgrounds" should be set to true and
|
||||
"android:windowTranslucentNavigation" should be set to false. -->
|
||||
<attr name="sucSystemNavBarDividerColor" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- FooterButton attributes -->
|
||||
<declare-styleable name="SucFooterButton">
|
||||
<attr name="android:text" />
|
||||
<attr name="android:theme" />
|
||||
<!-- Next value: 9 -->
|
||||
<attr name="sucButtonType">
|
||||
<enum name="other" value="0" />
|
||||
<enum name="add_another" value="1" />
|
||||
<enum name="cancel" value="2" />
|
||||
<enum name="clear" value="3" />
|
||||
<enum name="done" value="4" />
|
||||
<enum name="next" value="5" />
|
||||
<enum name="opt_in" value="6" />
|
||||
<enum name="skip" value="7" />
|
||||
<enum name="stop" value="8" />
|
||||
</attr>
|
||||
<attr name="sucFooterButtonPaddingStart" format="dimension" />
|
||||
<attr name="sucFooterButtonPaddingEnd" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Button of footer attributes -->
|
||||
<declare-styleable name="SucFooterBarMixin">
|
||||
<attr name="sucFooterBarButtonAllCaps" format="boolean" />
|
||||
<attr name="sucFooterBarButtonAlignEnd" format="boolean" />
|
||||
<attr name="sucFooterBarButtonCornerRadius" format="dimension" />
|
||||
<attr name="sucFooterBarButtonFontFamily" format="string|reference" />
|
||||
<attr name="sucFooterBarPaddingTop" format="dimension" />
|
||||
<attr name="sucFooterBarPaddingBottom" format="dimension" />
|
||||
<attr name="sucFooterBarPrimaryFooterBackground" format="color" />
|
||||
<attr name="sucFooterBarPrimaryFooterButton" format="reference" />
|
||||
<attr name="sucFooterBarSecondaryFooterBackground" format="color" />
|
||||
<attr name="sucFooterBarSecondaryFooterButton" format="reference" />
|
||||
<attr name="sucFooterBarButtonHighlightAlpha" format="float" />
|
||||
<attr name="sucFooterBarButtonColorControlHighlight" format="color" />
|
||||
<attr name="sucFooterBarButtonColorControlHighlightRipple" format="color" />
|
||||
<attr name="sucFooterBarPaddingVertical" format="dimension" />
|
||||
<attr name="sucFooterBarPaddingStart" format="dimension" />
|
||||
<attr name="sucFooterBarPaddingEnd" format="dimension" />
|
||||
<attr name="sucFooterBarMinHeight" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="SucHeaderMixin">
|
||||
<attr name="sucHeaderText" format="string" localization="suggested" />
|
||||
<attr name="sucHeaderTextColor" format="reference|color" />
|
||||
<attr name="sucGlifHeaderMarginTop" format="dimension" />
|
||||
<attr name="sucGlifHeaderMarginBottom" format="dimension" />
|
||||
<attr name="sucGlifIconMarginTop" format="dimension" />
|
||||
<attr name="sucHeaderContainerMarginBottom" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
26
setupcompat/main/res/values/colors.xml
Normal file
26
setupcompat/main/res/values/colors.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 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>
|
||||
|
||||
<!-- On versions < 23, we cannot reference other theme values in a color resource. Default to
|
||||
the framework default of 12% black -->
|
||||
<color name="suc_customization_button_highlight_ripple">#1f000000</color>
|
||||
|
||||
<color name="suc_customization_button_highlight_default">#ff1a73e8</color>
|
||||
|
||||
</resources>
|
||||
23
setupcompat/main/res/values/config.xml
Normal file
23
setupcompat/main/res/values/config.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 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>
|
||||
|
||||
<!-- ID used with View#setTag to store the original weight on a ButtonBar -->
|
||||
<item name="suc_customization_original_weight" type="id" />
|
||||
|
||||
</resources>
|
||||
82
setupcompat/main/res/values/styles.xml
Normal file
82
setupcompat/main/res/values/styles.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 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 xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Customization footer styles -->
|
||||
<style name="SucPartnerCustomizationButtonBar.Stackable" parent="SucPartnerCustomizationButtonBar">
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SucPartnerCustomizationButtonBar">
|
||||
<item name="android:baselineAligned">false</item>
|
||||
<item name="android:clipChildren">false</item>
|
||||
<item name="android:clipToPadding">false</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:minHeight">?attr/sucFooterBarMinHeight</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:paddingTop">?attr/sucFooterBarPaddingVertical</item>
|
||||
<item name="android:paddingBottom">?attr/sucFooterBarPaddingVertical</item>
|
||||
<item name="android:paddingEnd" tools:ignore="NewApi">?attr/sucFooterBarPaddingEnd</item>
|
||||
<item name="android:paddingLeft">?attr/sucFooterBarPaddingStart</item>
|
||||
<item name="android:paddingRight">?attr/sucFooterBarPaddingEnd</item>
|
||||
<item name="android:paddingStart" tools:ignore="NewApi">?attr/sucFooterBarPaddingStart</item>
|
||||
</style>
|
||||
|
||||
<style name="SucPartnerCustomizationButton.Primary" parent="android:Widget.Material.Button.Colored">
|
||||
<!-- This style can be applied to a button either as a "style" in XML, or as a theme in
|
||||
ContextThemeWrapper. These self-referencing attributes make sure this is applied as
|
||||
both to the button. -->
|
||||
<item name="android:buttonStyle">@style/SucPartnerCustomizationButton.Primary</item>
|
||||
<item name="android:theme">@style/SucPartnerCustomizationButton.Primary</item>
|
||||
|
||||
<!-- Values used in styles -->
|
||||
<item name="android:fontFamily" tools:targetApi="jelly_bean">?attr/sucFooterBarButtonFontFamily</item>
|
||||
<item name="android:paddingLeft">?attr/sucFooterButtonPaddingStart</item>
|
||||
<item name="android:paddingStart" tools:ignore="NewApi">?attr/sucFooterButtonPaddingStart</item>
|
||||
<item name="android:paddingRight">?attr/sucFooterButtonPaddingEnd</item>
|
||||
<item name="android:paddingEnd" tools:ignore="NewApi">?attr/sucFooterButtonPaddingEnd</item>
|
||||
<item name="android:textAllCaps">?attr/sucFooterBarButtonAllCaps</item>
|
||||
<item name="android:stateListAnimator" tools:ignore="NewApi">@null</item>
|
||||
|
||||
<!-- Values used in themes -->
|
||||
<item name="android:buttonCornerRadius" tools:ignore="NewApi">?attr/sucFooterBarButtonCornerRadius</item>
|
||||
</style>
|
||||
|
||||
<style name="SucPartnerCustomizationButton.Secondary" parent="android:Widget.Material.Button.Borderless.Colored">
|
||||
<!-- This style can be applied to a button either as a "style" in XML, or as a theme in
|
||||
ContextThemeWrapper. These self-referencing attributes make sure this is applied as
|
||||
both to the button. -->
|
||||
<item name="android:buttonStyle">@style/SucPartnerCustomizationButton.Secondary</item>
|
||||
<item name="android:theme">@style/SucPartnerCustomizationButton.Secondary</item>
|
||||
|
||||
<!-- Values used in styles -->
|
||||
<item name="android:fontFamily" tools:targetApi="jelly_bean">?attr/sucFooterBarButtonFontFamily</item>
|
||||
<item name="android:minWidth">0dp</item>
|
||||
<item name="android:paddingLeft">?attr/sucFooterButtonPaddingStart</item>
|
||||
<item name="android:paddingStart" tools:ignore="NewApi">?attr/sucFooterButtonPaddingStart</item>
|
||||
<item name="android:paddingRight">?attr/sucFooterButtonPaddingEnd</item>
|
||||
<item name="android:paddingEnd" tools:ignore="NewApi">?attr/sucFooterButtonPaddingEnd</item>
|
||||
<item name="android:textAllCaps">?attr/sucFooterBarButtonAllCaps</item>
|
||||
|
||||
<!-- Values used in themes -->
|
||||
<item name="android:buttonCornerRadius" tools:ignore="NewApi">?attr/sucFooterBarButtonCornerRadius</item>
|
||||
<item name="android:colorControlHighlight" tools:targetApi="lollipop">@color/suc_customization_button_highlight_ripple</item>
|
||||
<item name="sucFooterBarButtonColorControlHighlight">@color/suc_customization_button_highlight_ripple</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user