Themes: Add Live previews for applied themes and fonts

Co-authored-by: ender1324 <ender1324@abv.bg>
Signed-off-by: AndroBuddy <anirudhchimpidi8@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
AndroBuddy
2020-06-24 23:04:48 +05:30
committed by Hưng Phan
parent a83ca164a4
commit 22cb3c1afa
10 changed files with 244 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 ProjectFluid
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#ffffff"
android:pathData="M12,3.77L11.25,4.61C11.25,4.61 9.97,6.06 8.68,7.94C7.39,9.82 6,12.07 6,14.23A6,6 0 0,0 12,20.23A6,6 0 0,0 18,14.23C18,12.07 16.61,9.82 15.32,7.94C14.03,6.06 12.75,4.61 12.75,4.61L12,3.77M12,6.9C12.44,7.42 12.84,7.85 13.68,9.07C14.89,10.83 16,13.07 16,14.23C16,16.45 14.22,18.23 12,18.23C9.78,18.23 8,16.45 8,14.23C8,13.07 9.11,10.83 10.32,9.07C11.16,7.85 11.56,7.42 12,6.9Z" />
</vector>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 ProjectFluid
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.
-->
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1280dp"
android:height="549dp"
android:viewportWidth="1280"
android:viewportHeight="548">
<path
android:pathData="M0 0V548.127H1280V0"
android:fillColor="?android:attr/colorAccent"
android:fillAlpha="0.2"/>
</vector>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 ProjectFluid
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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/wave"/>
<item android:gravity="center">
<com.android.settingslib.widget.AdaptiveIconShapeDrawable
android:height="290dp"
android:width="290dp"
android:color="@color/preview_icon_shape_color"/>
</item>
<item android:height="181dp"
android:width="181dp"
android:gravity="center"
android:drawable="@drawable/fluid_icon"/>
</layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 ProjectFluid
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.
-->
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1280dp"
android:height="510dp"
android:viewportWidth="1280"
android:viewportHeight="510">
<path
android:pathData="M -11 -788 L 1291 -788 L 1291 1156 C 1291 1234.42 1227.42 1298 1149 1298 L 131 1298 C 52.576 1298 -11 1234.42 -11 1156 L -11 -788 Z"
android:fillColor="?android:attr/colorAccent"
android:fillAlpha="0.2" />
<path
android:pathData="M 1281 60 L 1227.17 68.203 C 1173.33 76.405 1065.67 92.81 958 158.431 C 850.333 224.051 742.667 260.203 635 252 C 527.333 243.797 419.667 174.836 312 158.431 C 149 133.594 42.833 306.077 -11 355.292 L -11 969 C -11 1043.56 49.42 1104 123.979 1104 L 1146.02 1104 C 1220.58 1104 1281 1043.56 1281 969 L 1281 60 Z"
android:fillColor="?android:attr/colorAccent"
android:fillAlpha="0.1" />
</vector>

27
res/drawable/wave.xml Normal file
View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 ProjectFluid
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.
-->
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1280dp"
android:height="549dp"
android:viewportWidth="1280"
android:viewportHeight="549">
<path
android:pathData="M 320.779 193.922 C 214.891 174.977 46.715 228.948 0 256.061 L 0 548.126 L 1280 548.126 L 1280 212.866 L 1227.06 227.074 C 1174.11 243.65 1068.22 272.067 959.221 291.011 C 853.333 309.956 747.445 319.428 641.557 295.747 C 532.555 272.067 426.667 212.866 320.779 193.922 Z"
android:fillColor="@color/wave-background" />
</vector>