From 38f2cce5650f9f606017c543d82bf405370bb78d Mon Sep 17 00:00:00 2001 From: vipulasri Date: Sat, 23 Dec 2017 19:19:54 +0530 Subject: [PATCH] UPDATE: library v1.0.3 + sample --- README.md | 16 ++++- sample/build.gradle | 4 +- .../ticketview/sample/MainActivity.kt | 8 ++- .../layout/bottomsheet_ticket_attributes.xml | 47 +------------- .../res/layout/item_background_options.xml | 62 +++++++++++++++++++ sample/src/main/res/values/strings.xml | 1 + ticketview/build.gradle | 2 +- 7 files changed, 86 insertions(+), 54 deletions(-) create mode 100644 sample/src/main/res/layout/item_background_options.xml diff --git a/README.md b/README.md index 4354bd5..72b3b76 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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' } ``` @@ -39,7 +40,7 @@ dependencies { com.vipulasri ticketview - 1.0.2 + 1.0.3 pom ``` @@ -152,6 +153,11 @@ If you Watch this repository, GitHub will send you an email every time I publish 4dp sets corner radius if corner rounder or scallop + + app:ticketElevation="14dp" + 0dp + sets elevation to ticket view on android jellybean adn above + ## Apps that use this library @@ -159,6 +165,10 @@ If you Watch this repository, GitHub will send you an email every time I publish If you're using this library in your app and you'd like to list it here, Please let me know via [email](mailto:vipulasri.2007@gmail.com), [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 diff --git a/sample/build.gradle b/sample/build.gradle index 67c8d6c..0904203 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -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 @@ -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() diff --git a/sample/src/main/java/com/vipulasri/ticketview/sample/MainActivity.kt b/sample/src/main/java/com/vipulasri/ticketview/sample/MainActivity.kt index 7fe7dbf..0b8a632 100644 --- a/sample/src/main/java/com/vipulasri/ticketview/sample/MainActivity.kt +++ b/sample/src/main/java/com/vipulasri/ticketview/sample/MainActivity.kt @@ -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 @@ -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 @@ -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 diff --git a/sample/src/main/res/layout/bottomsheet_ticket_attributes.xml b/sample/src/main/res/layout/bottomsheet_ticket_attributes.xml index 09ea805..d68349f 100644 --- a/sample/src/main/res/layout/bottomsheet_ticket_attributes.xml +++ b/sample/src/main/res/layout/bottomsheet_ticket_attributes.xml @@ -82,52 +82,7 @@ android:layout_width="match_parent" android:layout_height="20dp" /> - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml index 0743071..296cd4d 100644 --- a/sample/src/main/res/values/strings.xml +++ b/sample/src/main/res/values/strings.xml @@ -32,6 +32,7 @@ C5-C8 Corners Example + Background Normal diff --git a/ticketview/build.gradle b/ticketview/build.gradle index 0ffe43c..d87d5ea 100644 --- a/ticketview/build.gradle +++ b/ticketview/build.gradle @@ -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'