Awesome
SSAndroidNeumorphicKit
SSNeumorphicKit is to build Neumorphism design UI in Android.
Demo
-
Shape Type
Flat | Basin | Pressed |
---|---|---|
<img src="images/ssneumorphic_flatview.png" width="200" height="400"> | <img src="images/ssneumorphic_basinview.png" width="200" height="400"> | <img src="images/ssneumorphic_pressedview.png" width="200" height="400"> |
-
Light and Dark Mode
Light | Dark |
---|---|
<img src="images/ssneumorphic_flatview.png" width="280" height="600"> | <img src="images/ssneumorphic_flatview_dark.png" width="280" height="600"> |
-
FloatingActionButton
Features
-
Components
- SSNeumorphicCardView
- SSNeumorphicButton
- SSNeumorphicImageView
- SSNeumorphicImageButton
- SSNeumorphicFloatingActionButton
- SSNeumorphicEditText
-
Light and Dark mode
- Extend theme with
Theme.SSNeumorphic.DayNight
- Extend theme with
Gradle Dependency
- Add it in your <b>root</b> level build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency in your <b>app</b> level build.gradle.
dependencies {
implementation 'com.github.SimformSolutionsPvtLtd:SSAndroidNeumorphicKit:1.0.0'
}
Attributes
Attribute | Description | Default |
---|---|---|
ss_neumorphic_backgroundColor | Set background color | #EFEEEE |
ss_neumorphic_strokeColor | Set stroke color | N/A |
ss_neumorphic_strokeWidth | Set stroke width | 0dp |
ss_neumorphic_shapeType | Set shape type | flat |
ss_neumorphic_inset | Set all sides inset | 10dp |
ss_neumorphic_insetStart | Set start inset | 10dp |
ss_neumorphic_insetEnd | Set end inset | 10dp |
ss_neumorphic_insetTop | Set top inset | 10dp |
ss_neumorphic_insetBottom | Set bottom inset | 10dp |
ss_neumorphic_shadowElevation | Set elevation of the shadow | 6dp |
ss_neumorphic_shadowColorLight | Set light shadow color | #ffffff |
ss_neumorphic_shadowColorDark | Set dark shadow color | #d9d9d9 |
ss_neumorphic_noShadow | Set to hide shadow | false |
ss_neumorphic_shapeAppearance | Set shape appearance of the component | ShapeAppearance.SSNeumorphic.ComponentName |
Usage
<!-- Apply Widget.SSNeumorphic.CardView.Clickable style for click effect. -->
<com.simformsolutions.ssneumorphic.component.SSNeumorphicCardView
android:id="@+id/neumorphicCardView"
style="@style/Widget.SSNeumorphic.CardView"
android:layout_width="200dp"
android:layout_height="200dp"
app:ss_neumorphic_shapeAppearance="@style/ShapeAppearance.MyShape" />
<!-- styles.xml -->
<style name="ShapeAppearance.MyShape">
<item name="ss_neumorphic_cornerFamily">rounded</item>
<item name="ss_neumorphic_cornerRadius">8dp</item>
<item name="ss_neumorphic_cornerRadiusTopLeft">22dp</item>
<item name="ss_neumorphic_cornerRadiusBottomRight">22dp</item>
</style>
Find this library useful? :heart:
- Support it by joining stargazers for this repository. :star:
iOS Library
- Check our iOS version on Github
Awesome Mobile Libraries
- Check out our other available awesome mobile libraries
Credit
This library was inspired by fornewid/neumorphism
License
Copyright 2022 Simform Solutions
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.