Skip to content

birdeveloper/SpecialView

Repository files navigation

MIT License LinkedIn


ScreenShot

Special Layout

This layout will help you a lot while designing!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

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.

Getting Started

To get a local copy up and running follow these simple steps.

Installation

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'
  }

Usage

Android Studio can also be applied in the design section.

1. To create a button:
sample_button

<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:


sample_circle_gradient_color
<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:


sample_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:

sample_message_bg
<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"/>

Problems

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b birdeveloper/SpecialView)
  3. Commit your Changes (git commit -m 'Add some SpecialView')
  4. Push to the Branch (git push origin birdeveloper/SpecialView)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Görkem KARA - @gorkemkara - email

Project Link: https://github.com/birdeveloper/SpecialView

Acknowledgements

About

This layout will help you a lot while designing!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages