# ShadowLayout
**Repository Path**: baijuncheng-open-source/ShadowLayout
## Basic Information
- **Project Name**: ShadowLayout
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2021-05-19
- **Last Updated**: 2021-09-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## Description

OpenHarmony Shadow Layout is a library that you can custom attribute for shadow layout.
## User Guide
### Integration
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
```xml
allprojects {
repositories {
...
mavenCentral()
}
}
```
The lib is available on Maven Central, you can find it with [Gradle, please]
```xml
dependencies {
implementation 'com.gitee.baijuncheng-open-source:shadowlayout:1.0.1'
}
```
### Usage
Samples below are available in [sample project](sample/src/main/resources/base/layout/ability_main.xml)
**Available attributes**
```xml
sl_cornerRadius
sl_shadowRadius
sl_shadowColor
sl_dx
sl_dy
```
**Floating Action Button** with centered shadow.

```xml
```
Explanation
- `app:sl_cornerRadius="56vp"` - set corner radius to the same value as child view size to make it circle.
- `app:sl_dx="0vp"` `app:sl_dy="vdp"` - center shadow.
- `app:sl_shadowColor="#AA000000"`- shadow color.
- `app:sl_shadowRadius="4vp"`- shadow radius (shadow distance and bluer - works as `elevation`)
**Floating Action Button** with offset shadow.

```xml
```
Explanation
- `app:sl_dx="2vp"` `app:sl_dy="2vp"` - offset shadow to right and bottom for `2vp`.
**Raised Button** with centered shadow.

```xml
```
**Raised Button** with offset shadow.

```xml
```
## Change Log
### [1.0.0] - May, 2021
增加 shadow-layout 库;
## License
```
The MIT License (MIT)
Copyright (c) 2015 Danylyk Dmytro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```