项目作者: akshay2211

项目描述 :
With Oblique explore new styles of displaying images
高级语言: Java
项目地址: git://github.com/akshay2211/Oblique.git
创建时间: 2017-03-21T15:05:08Z
项目社区:https://github.com/akshay2211/Oblique

开源协议:Apache License 2.0

下载


Oblique

With Oblique explore new styles of displaying images

Join the chat at https://gitter.im/Oblique22/Lobby


@fxn769/oblique-attractive-android-ui-library-ae07a87a94">

Download

Demo

Usage

include namespace

  1. xmlns:app="http://schemas.android.com/apk/res-auto"

ObliqueView xml representation

  1. <ak.sh.ay.oblique.ObliqueView
  2. android:id="@+id/obliqueView"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:layout_margin="20dp"
  6. android:scaleType="centerCrop"
  7. app:angle="LEFT_BOTTOM_TO_RIGHT_TOP"
  8. android:src="@drawable/img"
  9. app:basecolor="#2E3192"
  10. app:startcolor="#D4145A"
  11. app:endcolor="#FBB03B"
  12. app:radius="18"
  13. app:shadow_height="10"
  14. app:ending_slant_angle="0"
  15. app:starting_slant_angle="10"
  16. app:type="linear_gradient" ></ak.sh.ay.oblique.ObliqueView>

Change your Style by changing oblique type

  1. app:type="image"
  2. app:type="solid_color"
  3. app:type="linear_gradient"
  4. app:type="radial_gradient"

or can do all that by java

  1. obliqueView.setType(Type.LINEAR_GRADIENT);
  2. obliqueView.setStartColor(Color.parseColor("#D4145A"));
  3. obliqueView.setEndColor(Color.parseColor("#FBB03B"));
  4. obliqueView.setAngle(GradientAngle.LEFT_BOTTOM_TO_RIGHT_TOP);
  5. obliqueView.setStartAngle(12);
  6. obliqueView.setEndAngle(0);
  7. obliqueView.setCornerRadius(15);
  8. obliqueView.setShadow(10);

set multiple types in java among these

  1. obliqueView.setType(Type.LINEAR_GRADIENT);
  2. IMAGE, LINEAR_GRADIENT, RADIAL_GRADIENT, SOLID_COLOR

add radius and elevation by

  1. obliqueView.setCornerRadius(15);
  2. obliqueView.setShadow(10);

Download

  1. implementation 'com.fxn769:oblique:2.2'

or Maven:

  1. <dependency>
  2. <groupId>com.fxn769</groupId>
  3. <artifactId>oblique</artifactId>
  4. <version>2.2</version>
  5. <type>pom</type>
  6. </dependency>

or ivy:

  1. <dependency org='com.fxn769' name='oblique' rev='2.2'>
  2. <artifact name='oblique' ext='pom' ></artifact>
  3. </dependency>

Snapshots of the development version are available in Sonatype’s snapshots repository.

License

Licensed under the Apache License, Version 2.2, click here for the full license.

Author & support

This project was created by Akshay Sharma.

If you appreciate my work, consider buying me a cup of :coffee: to keep me recharged :metal: by PayPal

I love using my work and I’m available for contract work. Freelancing helps to maintain and keep my open source projects up to date!

forthebadge