Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cdflynn/crossview
- Owner: cdflynn
- License: other
- Created: 2015-05-03T17:24:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-27T03:37:59.000Z (almost 9 years ago)
- Last Synced: 2024-07-31T18:17:11.080Z (5 months ago)
- Topics: android, android-library, android-ui
- Language: Java
- Size: 241 KB
- Stars: 317
- Watchers: 11
- Forks: 46
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- -awesome-android-ui - Cross View - 2.0) | <img src="/art/crossview.gif" width="49%"> <img src="/art/crossview2.gif" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - Cross View - 2.0) | <img src="/art/crossview.gif" width="49%"> <img src="/art/crossview2.gif" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - Cross View - 2.0) | <img src="/art/crossview.gif" width="49%"> <img src="/art/crossview2.gif" width="49%"> (Index)
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'
}
```