67 lines
3.2 KiB
XML
Raw Normal View History

<!--
~ 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>
<!--Shape-->
<!--Material allows theming of a components shape through the customization of corner -->
<!--style and radius size. To systematically apply shape throughout your app, it helps to -->
<!--understand that components are categorized by size, grouped into categories of small, -->
<!--medium and large. Each component size group can be themed by overriding the Material -->
<!--Components attributes ?shapeAppearanceSmallComponent, ?shapeAppearanceMediumComponent -->
<!--and ?shapeAppearanceLargeComponent in your app's theme. Those attributes are already -->
<!--defined as default styles overridden for you in themes.xml and point to the styles in -->
<!--this file.-->
<!--Experiment with ShapeAppearance properties such as cornerFamily (either cut or -->
<!--rounded) and corner size. Alternatively, customize each ShapeAppearance on a -->
<!--per-corner basis with cornerFamilyTopLeft, cornerFamilyTopRight, cornerFamilyBottomLeft, -->
<!--cornerFamilyBottomRight and cornerSizeTopRight, cornerSizeTopLeft, cornerSizeBottomLeft -->
<!--and cornerSizeBottomRight.-->
<!--Shape Appearance for small components like chips, buttons, text fields and FABs-->
<style name="ShapeAppearance.App.SmallComponent" parent="ShapeAppearance.MaterialComponents.SmallComponent">
<item name="cornerSize">4dp</item>
<item name="cornerFamily">rounded</item>
</style>
<!--Shape Appearance for medium components like cards, alert dialogs-->
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.MaterialComponents.MediumComponent">
<item name="cornerSize">16dp</item>
<item name="cornerFamily">rounded</item>
</style>
<!--Shape Appearance for large components like side and bottom navigation drawers-->
<style name="ShapeAppearance.App.LargeComponent" parent="ShapeAppearance.MaterialComponents.LargeComponent">
<item name="cornerSizeTopLeft">20dp</item>
<item name="cornerSizeTopRight">20dp</item>
<item name="cornerSizeBottomRight">0dp</item>
<item name="cornerSizeBottomLeft">0dp</item>
<item name="cornerFamily">rounded</item>
</style>
<style name="ShapeAppearance.App.Button" parent="ShapeAppearance.MaterialComponents.SmallComponent">
<item name="cornerSize">50%</item>
<item name="cornerFamily">rounded</item>
</style>
<style name="ShapeAppearance.App.Card" parent="ShapeAppearance.MaterialComponents.MediumComponent">
<item name="cornerSize">4dp</item>
<item name="cornerFamily">rounded</item>
</style>
</resources>