fix: 首次提交

This commit is contained in:
2024-12-09 11:25:23 +08:00
parent d0c01071e9
commit 2c2109a5f3
4741 changed files with 290641 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="?attr/sucFooterBarButtonHighlightAlpha"
android:color="?attr/sucFooterBarButtonColorControlHighlightRipple" />
</selector>

View File

@@ -0,0 +1,35 @@
<?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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/suc_layout_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/suc_layout_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ViewStub
android:id="@+id/suc_layout_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

View File

@@ -0,0 +1,42 @@
<?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.
-->
<com.google.android.setupcompat.view.StatusBarBackgroundLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/suc_layout_status"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/suc_layout_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ViewStub
android:id="@+id/suc_layout_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</com.google.android.setupcompat.view.StatusBarBackgroundLayout>

View File

@@ -0,0 +1,23 @@
<?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.
-->
<!-- A simple button to be inflated by the inflater. This allows creating AppCompatButton without
maintaining separate versions for compat and platform. -->
<com.google.android.setupcompat.template.FooterActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

View File

@@ -0,0 +1,23 @@
<?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.
-->
<com.google.android.setupcompat.view.ButtonBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/suc_footer_button_bar"
style="@style/SucPartnerCustomizationButtonBar.Stackable"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View 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>

View 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>

View 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>

View 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>