fix: 首次提交
This commit is contained in:
25
SettingsLib/BarChartPreference/res/values/attrs.xml
Normal file
25
SettingsLib/BarChartPreference/res/values/attrs.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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>
|
||||
|
||||
<declare-styleable name="SettingsBarView">
|
||||
<!-- The color of bar view -->
|
||||
<attr name="barColor" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
23
SettingsLib/BarChartPreference/res/values/colors.xml
Normal file
23
SettingsLib/BarChartPreference/res/values/colors.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019 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>
|
||||
<color name="settings_bar_view_1_color">#A142F4</color>
|
||||
<color name="settings_bar_view_2_color">#24C1E0</color>
|
||||
<color name="settings_bar_view_3_color">#4285F4</color>
|
||||
<color name="settings_bar_view_4_color">#009688</color>
|
||||
</resources>
|
||||
21
SettingsLib/BarChartPreference/res/values/dimens.xml
Normal file
21
SettingsLib/BarChartPreference/res/values/dimens.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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>
|
||||
<dimen name="settings_bar_view_max_height">72dp</dimen>
|
||||
<dimen name="settings_bar_view_icon_size">24dp</dimen>
|
||||
</resources>
|
||||
108
SettingsLib/BarChartPreference/res/values/styles.xml
Normal file
108
SettingsLib/BarChartPreference/res/values/styles.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?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"
|
||||
tools:targetApi="28">
|
||||
|
||||
<style name="SettingsBarChart">
|
||||
<item name="android:layout_marginStart">10dp</item>
|
||||
<item name="android:layout_marginEnd">10dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartTitle">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textAppearance">@style/BarChart.Text.HeaderTitle</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartDetailsButton"
|
||||
parent="@android:style/Widget.DeviceDefault.Button.Borderless.Colored">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarViewStyle">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">168dp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:layout_marginStart">8dp</item>
|
||||
<item name="android:layout_marginEnd">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartEmptyText">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">@dimen/settings_bar_view_max_height</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:visibility">gone</item>
|
||||
<item name="android:textAppearance">@style/BarChart.Text.Summary</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartBar">
|
||||
<item name="android:layout_width">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartBarIcon">
|
||||
<item name="android:layout_width">@dimen/settings_bar_view_icon_size</item>
|
||||
<item name="android:layout_height">@dimen/settings_bar_view_icon_size</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:layout_marginTop">12dp</item>
|
||||
<item name="android:tint">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartBarTitle">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginTop">12dp</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:ellipsize">marquee</item>
|
||||
<item name="android:textAppearance">@style/BarChart.Text.Title</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsBarChartBarSummary">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginTop">4dp</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:ellipsize">marquee</item>
|
||||
<item name="android:textAppearance">@style/BarChart.Text.Summary</item>
|
||||
</style>
|
||||
|
||||
<style name="BarChart.Text"
|
||||
parent="@android:style/TextAppearance.DeviceDefault.WindowTitle">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="BarChart.Text.HeaderTitle">
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="BarChart.Text.Title">
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="BarChart.Text.Summary"
|
||||
parent="@android:style/TextAppearance.DeviceDefault">
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user