GradientLayout

by csdodd

Android gradient backgrounds for your layouts

212 Stars 42 Forks Last release: Not found Apache License 2.0 13 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

GradientLayout

Android
Arsenal

A library which extends Android layouts to allow for the easy configuring of gradient backgrounds.

Gradle

dependencies {
    compile 'net.colindodd:gradientlayout:1.2'
}

Usage

</net.colindodd.gradientlayout.gradientrelativelayout>

    final GradientLinearLayout layout = (GradientLinearLayout) view.findViewById(R.id.root);
    layout.setStartColor(Color.rgb(255,87,34))
          .setEndColor(Color.rgb(255,193,7))
          .setOrientation(GradientDrawable.Orientation.TR_BL);

Or just provide a single color and the layout will generate a gradient for you: ```java final GradientLinearLayout layout = (GradientLinearLayout) view.findViewById(R.id.root); layout.setEndColor(Color.rgb(123,31,162));

Orientation is the same as [GradientDrawable.Orientation](https://developer.android.com/reference/android/graphics/drawable/GradientDrawable.Orientation.html)

The following classes are included:

  • GradientAbsoluteLayout
  • GradientFrameLayout
  • GradientGridLayout
  • GradientLinearLayout
  • GradientRelativeLayout
  • GradientTableLayout

License

Copyright 2016 Colin Dodd

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.