limuyang2 / LShadowLayout

🌒(Support AndroidX)一个阴影控件,可调整阴影颜色深浅、扩散面积、圆角 (A shadow control that adjusts the shade of the shadow, the diffuse area, and the fillet)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License

LShadowLayout

This control is extracted fromQMUI,You can adjust the depth, area, and fillet of the control's shadow

Invalid shadows in Android 4.4 and below

Preview

Demo download link

demo apk

Obtain

First add in the repositories of build.gradle :

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Then add in dependencies:

dependencies {
        // AndroidX
	implementation 'com.github.limuyang2:LShadowLayout:1.0.7'


        implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
        implementation 'androidx.appcompat:appcompat:1.2.0'
}

if you use Android Support,Please use the following:

dependencies {
	implementation 'com.github.limuyang2:LShadowLayout:1.0.3'
}

Use

The controls already included in this library are:
ShadowLinearLayout
ShadowRelativeLayout
ShadowConstraintLayout
ShadowFrameLayout

Simply replace the corresponding layout in the project.
E.g:

    <top.limuyang2.shadowlayoutlib.ShadowLinearLayout
        …………
        android:background="#fff"
        android:padding="12dp"
        app:l_radius="3dp" //Rounded corner size
        app:l_shadowAlpha="0.2"  //Shadow alpha
        app:l_shadowElevation="5dp" //Shadow value >
        
    </top.limuyang2.shadowlayoutlib.ShadowLinearLayout>

More properties, please see the source code

License

2018 limuyang
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.

About

🌒(Support AndroidX)一个阴影控件,可调整阴影颜色深浅、扩散面积、圆角 (A shadow control that adjusts the shade of the shadow, the diffuse area, and the fillet)

License:Apache License 2.0


Languages

Language:Java 97.2%Language:Kotlin 2.8%