Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vipulasri/ticketview

An Android library to implement TicketView in android with normal, rounded and scallop corners
https://github.com/vipulasri/ticketview

android customview ticketview ui

Last synced: 3 days ago
JSON representation

An Android library to implement TicketView in android with normal, rounded and scallop corners

Awesome Lists containing this project

README

        

# TicketView

An Android Library used to implement TicketView in android with normal, rounded and scallop corners.

### Specs
[![API](https://img.shields.io/badge/API-15%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=15)
[![Maven Central](https://img.shields.io/maven-central/v/com.vipulasri/ticketview.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.vipulasri%22%20AND%20a:%22ticketview%22)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/vipulasri/Timeline-View/blob/master/LICENSE)

### Badges/Featured In
[![TicketView](https://www.appbrain.com/stats/libraries/shield/ticketview.svg)](https://www.appbrain.com/stats/libraries/details/ticketview/ticketview)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Ticket%20View-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/6521)
[![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23171-blue.svg)](https://www.androiddevdigest.com/digest-171/)

![showcase](https://github.com/vipulasri/TicketView/blob/master/art/showcase.png)

## Sample Project

For information : checkout [Sample App Code](https://github.com/vipulasri/TicketView/tree/master/sample) in repository.

### Download

[![TicketView on Google Play](https://github.com/vipulasri/TicketView/blob/master/art/google_play.png)](https://play.google.com/store/apps/details?id=com.vipulasri.ticketview.sample)

## Quick Setup

### 1. Include library

**Using Gradle**

``` gradle
dependencies {
implementation 'com.vipulasri:ticketview:1.1.2'
}
```

### What's New

See the project's Releases page for a list of versions with their change logs.

### [View Releases](https://github.com/vipulasri/TicketView/releases)

If you Watch this repository, GitHub will send you an email every time I publish an update.

### 2. Usage
* In XML Layout :

``` java

```

* Configure using xml attributes or setters in code:


Attribute Name
Default Value
Description

app:ticketOrientation="vertical"
horizontal
sets orientation of divider and scallop


app:ticketBackgroundColor="@android:color/black"
white
sets background color


app:ticketScallopRadius="10dp"
20dp
sets scallop radius


app:ticketScallopPositionPercent="50"
50
sets position of scallop and divider


app:ticketShowBorder="false"
false
shows border if `true`


app:ticketBorderWidth="4dp"
2dp
sets border width


app:ticketBorderColor="@color/grey"
black
sets border color


app:ticketShowDivider="true"
false
shows divider if `true`


app:ticketDividerType="dash"
normal
sets type of divider ie `normal` or `dash`


app:ticketDividerColor="@color/colorAccent"
dark gray
sets divider color


app:ticketDividerWidth="2dp"
2dp
sets divider width


app:ticketDividerPadding="0dp"
10dp
sets divider padding


app:ticketDividerDashGap="4dp"
4dp
sets divider dash gap


app:ticketDividerDashLength="8dp"
8dp
sets divider dash length


app:ticketCornerType="rounded"
normal
sets type of corner ie `normal` or `rounded` or `scallop`


app:ticketCornerRadius="15dp"
4dp
sets corner radius if corner rounder or scallop


app:ticketElevation="14dp"
0dp
sets elevation to ticket view on android jellybean and above


app:ticketBackgroundBeforeDivider
none
sets background to ticket view before divider


app:ticketBackgroundAfterDivider
none
sets background to ticket view after divider


app:ticketShadowColor
black
sets shadow to ticket view



## Apps that use this library

* [Open. Yoga](https://play.google.com/store/apps/details?id=com.labfoodandfriends.nikitagudkovs.jlogOpen_yoga)
* [Open. Gym](https://play.google.com/store/apps/details?id=com.labfoodandfriends.nikitagudkovs.jlog_gym)

[Apps using Ticket View, via AppBrain Stats](https://www.appbrain.com/stats/libraries/details/ticketview/ticketview)

If you're using this library in your app and you'd like to list it here,
Please let me know via [email](mailto:[email protected]), [pull requests](https://github.com/vipulasri/TicketView/pulls) or [issues](https://github.com/vipulasri/TicketView/issues).

## Special Thanks

[**Nick Butcher**](https://github.com/nickbutcher) for helping me out with TicketView Shadow/Elevation.

## License

Copyright 2017 Vipul Asri

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.