Gradient Layout for dynamic gradients in android (without drawable) – Library

Published by Kapil Mohan on

Normally android uses a drawable shape resource for setting the gradient process, which sometimes is difficult as we need to create multiple resource files for using dynamic gradients.

Setting multiple gradients within Recycler view is also a tedious process. GradientLayout Library extends common Layouts (Linear, Relative, Table, etc…) and adds an attribute for mentioning gradient colors which enable users to design the layouts without creating any additional files.

Github Link:-

Available Layouts:

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

Or just provide a single color and the layout will generate a gradient for you:

Example for using with card layout

Libray Details:

Kapil Mohan

Like to add color to developers life and apps. Can create smile using Android, iOS, PHP, codeignitor, web technologies, etc... Feel free to contact me at [email protected] .