Skip to content

Commit

Permalink
UPDATE: library v1.0.3 + sample
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulasri committed Dec 23, 2017
1 parent 082d661 commit 38f2cce
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 54 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
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)
[![Download](https://api.bintray.com/packages/vipulasri/maven/TicketView/images/download.svg)](https://bintray.com/vipulasri/maven/TicketView/_latestVersion)
[![MethodsCount](https://img.shields.io/badge/Methods%20and%20size-98%20|%2010KB-e91e63.svg)](http://www.methodscount.com/?lib=com.vipulasri%3Aticketview%3A1.0.2)
[![MethodsCount](https://img.shields.io/badge/Methods%20and%20size-125%20|%2012KB-e91e63.svg)](http://www.methodscount.com/?lib=com.vipulasri%3Aticketview%3A1.0.2)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/vipulasri/Timeline-View/blob/master/LICENSE)

### Badges/Featured In
Expand All @@ -29,7 +30,7 @@ For information : checkout [Sample App Code](https://github.com/vipulasri/Ticket

``` gradle
dependencies {
compile 'com.vipulasri:ticketview:1.0.2'
compile 'com.vipulasri:ticketview:1.0.3'
}
```

Expand All @@ -39,7 +40,7 @@ dependencies {
<dependency>
<groupId>com.vipulasri</groupId>
<artifactId>ticketview</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<type>pom</type>
</dependency>
```
Expand Down Expand Up @@ -152,13 +153,22 @@ If you Watch this repository, GitHub will send you an email every time I publish
<td>4dp</td>
<td>sets corner radius if corner rounder or scallop</td>
</tr>
<tr>
<td>app:ticketElevation="14dp"</td>
<td>0dp</td>
<td>sets elevation to ticket view on android jellybean adn above</td>
</tr>
</table>

## Apps that use this library

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

Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
applicationId "com.vipulasri.ticketview.sample"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 1
versionCode 2
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -40,7 +40,7 @@ dependencies {
implementation "com.jakewharton:butterknife:$versions.butterknife"
kapt "com.jakewharton:butterknife-compiler:$versions.butterknife"
implementation project(":ticketview")
//implementation 'com.vipulasri:ticketview:1.0.2'
//implementation 'com.vipulasri:ticketview:1.0.3'
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ package com.vipulasri.ticketview.sample
import android.content.Intent
import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v7.app.AppCompatActivity
import android.view.View
import com.vipulasri.ticketview.TicketView

import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.content_main.*
import com.thebluealliance.spectrum.SpectrumDialog
import android.graphics.PorterDuff
Expand All @@ -17,6 +15,7 @@ import android.view.Menu
import android.view.MenuItem
import android.widget.AdapterView
import android.widget.ImageView
import kotlinx.android.synthetic.main.item_background_options.*
import kotlinx.android.synthetic.main.item_border_options.*
import kotlinx.android.synthetic.main.item_divider_options.*
import android.widget.RadioGroup
Expand Down Expand Up @@ -85,6 +84,11 @@ class MainActivity : BaseActivity() {
image_border_color.background.setColorFilter(ticketView.borderColor, PorterDuff.Mode.SRC_ATOP)
image_divider_color.background.setColorFilter(ticketView.dividerColor, PorterDuff.Mode.SRC_ATOP)

when(ticketView.orientation) {
TicketView.Orientation.HORIZONTAL -> radioButton_horizontal.isChecked = true
TicketView.Orientation.VERTICAL -> radioButton_vertical.isChecked = true
}

radioGroup_orientation.setOnCheckedChangeListener(RadioGroup.OnCheckedChangeListener { group, checkedId ->
when(checkedId) {
R.id.radioButton_horizontal -> ticketView.orientation = TicketView.Orientation.HORIZONTAL
Expand Down
47 changes: 1 addition & 46 deletions sample/src/main/res/layout/bottomsheet_ticket_attributes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,52 +82,7 @@
android:layout_width="match_parent"
android:layout_height="20dp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">

<android.support.v7.widget.AppCompatTextView
style="@style/Heading"
android:text="@string/background_color" />

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:padding="1dp"
android:background="@drawable/bg_oval_border_black">

<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:id="@+id/image_background_color"
android:background="@drawable/bg_oval_white"/>

</RelativeLayout>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">

<android.support.v7.widget.AppCompatTextView
style="@style/Label"
android:text="@string/elevation" />

<org.adw.library.widgets.discreteseekbar.DiscreteSeekBar
style="@style/DiscreteSeekBar"
android:id="@+id/seekBar_elevation"
app:dsb_min="0"
app:dsb_max="24"
app:dsb_value="12"/>

</LinearLayout>
<include layout="@layout/item_background_options"/>

<android.support.v4.widget.Space
android:layout_width="match_parent"
Expand Down
62 changes: 62 additions & 0 deletions sample/src/main/res/layout/item_background_options.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">

<android.support.v7.widget.AppCompatTextView
style="@style/Heading"
android:text="@string/background" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">

<android.support.v7.widget.AppCompatTextView
style="@style/Label"
android:text="@string/elevation" />

<org.adw.library.widgets.discreteseekbar.DiscreteSeekBar
style="@style/DiscreteSeekBar"
android:id="@+id/seekBar_elevation"
app:dsb_min="0"
app:dsb_max="24"
app:dsb_value="12"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">

<android.support.v7.widget.AppCompatTextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="@string/color"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"/>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:padding="1dp"
android:background="@drawable/bg_oval_border_black">

<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:id="@+id/image_background_color"
android:background="@drawable/bg_oval_white"/>

</RelativeLayout>

</LinearLayout>

</LinearLayout>
1 change: 1 addition & 0 deletions sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<string name="movie_seat">C5-C8</string>
<string name="corners">Corners</string>
<string name="example">Example</string>
<string name="background">Background</string>

<string-array name="divider_type">
<item>Normal</item>
Expand Down
2 changes: 1 addition & 1 deletion ticketview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
groupId = 'com.vipulasri'
libraryName = 'TicketView'
artifact = 'ticketview'
libraryVersion = '1.0.2'
libraryVersion = '1.0.3'
libraryDescription = 'A custom view to implement TicketView in android.'

siteUrl = 'https://github.com/vipulasri/TicketView'
Expand Down

0 comments on commit 38f2cce

Please sign in to comment.