oblique
akshay2211
572
Visit GitHub RepoImage Views

Oblique

With Oblique explore new styles of displaying images

Join the chat at https://gitter.im/Oblique22/Lobby Android Arsenal Release API

Download

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

Download or grab via Gradle:

        compile 'com.fxn769:oblique:2.0'

or Maven:

        <dependency>
          <groupId>com.fxn769</groupId>
          <artifactId>oblique</artifactId>
          <version>2.0</version>
          <type>pom</type>
        </dependency>

or ivy:

        <dependency org='com.fxn769' name='oblique' rev='2.0'>
          <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.0, 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!

forthebadge

Become a better Android Developer
Millions of developers are learning at MindOrks

Online Training Program

Featured Blogs

Our Team

MindOrks is Certainly one of the best online blog to stay on top of all the Android development news, coding and design patterns. Finally a blog I can count on to keep myself updated with latest and greatest things happening in Android world.

Vipul Shah
Android Developer
Microsoft

Become Pro in Android by watching videos

OUR LEARNERS WORK AT