fix: 首次提交
This commit is contained in:
22
SettingsLib/ButtonPreference/res/values/attrs.xml
Normal file
22
SettingsLib/ButtonPreference/res/values/attrs.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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>
|
||||
<declare-styleable name="ButtonPreference">
|
||||
<attr name="android:gravity" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
21
SettingsLib/ButtonPreference/res/values/colors.xml
Normal file
21
SettingsLib/ButtonPreference/res/values/colors.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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>
|
||||
<!-- Material inverse ripple color, useful for inverted backgrounds. -->
|
||||
<color name="settingslib_button_ripple">@color/settingslib_ripple_material_dark</color>
|
||||
</resources>
|
||||
20
SettingsLib/ButtonPreference/res/values/dimens.xml
Normal file
20
SettingsLib/ButtonPreference/res/values/dimens.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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>
|
||||
<item name="settingslib_highlight_alpha_material_light" format="float" type="dimen">0.10</item>
|
||||
<item name="settingslib_highlight_alpha_material_dark" format="float" type="dimen">0.10</item>
|
||||
</resources>
|
||||
33
SettingsLib/ButtonPreference/res/values/styles.xml
Normal file
33
SettingsLib/ButtonPreference/res/values/styles.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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="SettingsLibRoundedCornerThemeOverlay">
|
||||
<item name="android:paddingStart">16dp</item>
|
||||
<item name="android:paddingEnd">16dp</item>
|
||||
<item name="android:colorControlHighlight">@color/settingslib_button_ripple</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsLibButtonStyle" parent="android:Widget.Material.Button">
|
||||
<item name="android:theme">@style/SettingsLibRoundedCornerThemeOverlay</item>
|
||||
<item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Medium</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/settingslib_btn_colored_text_material</item>
|
||||
<item name="android:background">@drawable/settingslib_btn_colored_material</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user