Created
July 31, 2020 20:23
-
-
Save ricknout/0f43afeaa9b90c2c067e2b9be946a1c2 to your computer and use it in GitHub Desktop.
MDC-Android shape in custom views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Copyright 2020 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 --> | |
<!-- In res/values/attrs.xml --> | |
<declare-styleable name="AppCustomView"> | |
<attr name="shapeAppearance" /> | |
... | |
</declare-styleable> | |
<!-- In res/values/styles.xml --> | |
<style name="Widget.App.CustomView" parent="android:Widget"> | |
<item name="android:background">@null</item> | |
<item name="shapeAppearance">?attr/shapeAppearanceMediumComponent</item> | |
... | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment