Oblique
With Oblique explore new styles of displaying images
Demo
Usage
include namespace
xmlns:app="http://schemas.android.com/apk/res-auto"
ObliqueView xml representation
<ak.sh.ay.oblique.ObliqueView
android:id="@+id/obliqueView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:scaleType="centerCrop"
app:angle="LEFT_BOTTOM_TO_RIGHT_TOP"
android:src="@drawable/img"
app:basecolor="#2E3192"
app:startcolor="#D4145A"
app:endcolor="#FBB03B"
app:radius="18"
app:shadow_height="10"
app:ending_slant_angle="0"
app:starting_slant_angle="10"
app:type="linear_gradient" />
Change your Style by changing oblique type
app:type="image"
app:type="solid_color"
app:type="linear_gradient"
app:type="radial_gradient"
or can do all that by java
obliqueView.setType(Type.LINEAR_GRADIENT);
obliqueView.setStartColor(Color.parseColor("#D4145A"));
obliqueView.setEndColor(Color.parseColor("#FBB03B"));
obliqueView.setAngle(GradientAngle.LEFT_BOTTOM_TO_RIGHT_TOP);
obliqueView.setStartAngle(12);
obliqueView.setEndAngle(0);
obliqueView.setCornerRadius(15);
obliqueView.setShadow(10);
set multiple types in java among these
obliqueView.setType(Type.LINEAR_GRADIENT);
IMAGE, LINEAR_GRADIENT, RADIAL_GRADIENT, SOLID_COLOR
add radius and elevation by
obliqueView.setCornerRadius(15);
obliqueView.setShadow(10);
Download
implementation 'com.fxn769:oblique:2.2'
or Maven:
<dependency>
<groupId>com.fxn769</groupId>
<artifactId>oblique</artifactId>
<version>2.2</version>
<type>pom</type>
</dependency>
or ivy:
<dependency org='com.fxn769' name='oblique' rev='2.2'>
<artifact name='oblique' ext='pom' ></artifact>
</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 ☕ to keep me recharged 🤘 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!