Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cdflynn/crossview

A Toggling Add/Remove button
https://github.com/cdflynn/crossview

android android-library android-ui

Last synced: 2 months ago
JSON representation

A Toggling Add/Remove button

Awesome Lists containing this project

README

        

# Cross View

[![Release](https://img.shields.io/github/release/cdflynn/crossview.svg?label=JitPack)](https://jitpack.io/#cdflynn/crossview)

![Sample App](https://github.com/cdflynn/crossview/blob/master/sample/images/cross_btn_2.gif?raw=true)

![Action Bar](https://github.com/cdflynn/crossview/blob/master/sample/images/cross_btn.gif?raw=true)

Add a CrossView to your layout
```xml

```

Note that you can define the color with `lineColor`

toggle in code:
```java
private final View.OnClickListener mCrossViewClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
mCrossView.toggle();
}
};
```

You can also set a state directly:
```java
mCrossView.plus();
```
```java
mCrossView.cross();
```

Optionally supply an animation duration in milliseconds

```java
mCrossView.cross(0l);
```

```java
mCrossView.toggle(150l);
```

```java
mCrossView.plus(200l);
```

## Install

You can install using gradle:

```gradle
repositories {
maven { url "https://jitpack.io" }
}

dependencies {
compile 'com.github.cdflynn:crossview:v1.0.1'
}
```