This layout will help you a lot while designing!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
With this library you will stop creating backgrounds that are constantly drawable. Because this layout will allow you to see many things simultaneously, such as background color, radius values, gradient colors, while you design. SpecialLayout is derived from a ConstraintLayout layout. This library will save you from confusion while saving you time.
To get a local copy up and running follow these simple steps.
To get a Git project into your build:
Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.birdeveloper:SpecialView:1.1.1'
}
Android Studio can also be applied in the design section.
<com.birdeveloper.specialview.SpecialLayout
android:id="@+id/specialLayout"
android:layout_width="200dp"
android:layout_height="50dp"
app:color="#30DC22"
app:shadow="false"
app:radius="30dp"
app:shadowAlpha="255"
app:shadowColor="#000000">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:textColor="#fff"
android:text="Button" />
</com.birdeveloper.specialview.SpecialLayout>
2. To create Round element with gradient:
<com.birdeveloper.specialview.SpecialLayout
android:id="@+id/specialLayout"
android:layout_width="100dp"
android:layout_height="100dp"
app:gradientCenterColor="#3613FF"
app:gradientEndColor="#FF0000"
app:gradientType="linear"
app:gradientAngle="LEFT_RIGHT"
app:gradientStartColor="#FF8C00"
app:radius="100dp" />
gradientType values: linear (default), sweep, radial
gradientAngle values: LEFT_RIGHT, BOTTOM_TOP, RIGHT_LEFT, TOP_BOTTOM (default)
3. To create a shape:
<com.birdeveloper.specialview.SpecialLayout
android:id="@+id/specialLayout"
android:layout_width="100dp"
android:layout_height="100dp"
app:color="#DC2222"
app:radius="16dp" />
4. To create a message background:
<com.birdeveloper.specialview.SpecialLayout
android:id="@+id/specialLayout"
android:layout_width="200dp"
android:layout_height="50dp"
app:bottomLeftRadius="100dp"
app:bottomRightRadius="0dp"
app:color="#3488E1"
app:shadow="false"
app:shadowAlpha="255"
app:shadowColor="#000000"
app:topLeftRadius="100dp"
app:topRightRadius="100dp"/>
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b birdeveloper/SpecialView
) - Commit your Changes (
git commit -m 'Add some SpecialView'
) - Push to the Branch (
git push origin birdeveloper/SpecialView
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Görkem KARA - @gorkemkara - email
Project Link: https://github.com/birdeveloper/SpecialView