Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.iml
.idea/
.gradle
/local.properties
/.idea/workspace.xml
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<com.mreram.ticketview.TicketView
android:layout_width ="match_parent"
android:layout_height="wrap_content"
app:tv_anchor1="@+id/cl_head"
app:tv_anchor2="@+id/cl_center"
app:tv_anchors="cl_head,cl_center"
app:tv_enableSemiCircleOnTop="true"
app:tv_circleSpace="15dp"
app:tv_dashSize="1.5dp"
app:tv_dashColor="@color/colorPrimary"
Expand Down Expand Up @@ -70,8 +70,8 @@ compile 'com.github.mreram:ticketview:1.0.0'
| tv_dashSize(optional) | dash size |
| tv_dashColor(optional) | dash color |
| tv_circleSpace(optional) | space between top circles |
| tv_anchor1 | determines where separator is drawn |
| tv_anchor2(optional) | determines where separator is drawn |
| tv_anchors(optional) | determines where separator is drawn |
| tv_enableSemiCircleOnTop(default value = true) | determines whether bunch of semi circle drawn on start of TicketView |


## Contribution :collision:
Expand Down
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
compileSdkVersion 30
defaultConfig {
applicationId "com.mreram.sampleticketview"
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -23,10 +23,10 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation project(':ticketview')
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.mreram.sampleticketview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.mreram.sampleticketview

import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle


Expand Down
18 changes: 10 additions & 8 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
>


<com.mreram.ticketview.TicketView
<com.mreram.ticketview.TicketView
android:layout_width ="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:tv_anchor1="@+id/cl_head"
app:tv_anchor2="@+id/cl_center"
>
app:tv_anchors="cl_head,cl_center"
app:tv_dashColor="@color/colorAccent"
app:tv_enableSemiCircleOnTop="true">

<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_head"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -61,9 +61,9 @@
app:layout_constraintTop_toTopOf="parent" />


</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -108,6 +108,7 @@
<View
android:layerType="software"
android:background="@drawable/divider_container"
android:visibility="invisible"
android:layout_width="0dp"
android:layout_height="5dp"
app:layout_constraintLeft_toLeftOf="parent"
Expand Down Expand Up @@ -151,6 +152,7 @@
app:layout_constraintTop_toBottomOf="@id/txt_dst" />
<View
android:layerType="software"
android:visibility="invisible"
android:background="@drawable/divider_container"
android:layout_width="0dp"
android:layout_height="5dp"
Expand All @@ -165,7 +167,7 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_name" />

</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>


<TextView
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/res/layout/activity_ticket.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cl"
android:id="@+id/cl_center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_pattern"
android:padding="10dp"
tools:context="com.ticketview.mreram.sample.TicketActivity">
android:padding="10dp">


<com.ticketview.mreram.sample.TicketView
<com.mreram.ticketview.TicketView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:tv_anchor1="@+id/cl_head"
app:tv_anchor2="@+id/cl_center"
app:tv_enableSemiCircleOnTop="false"
app:tv_anchors=""
app:tv_circleRadius="9dp">

<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_head"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_ticket_top">


<TextView
android:id="@+id/txt_code"
android:layout_width="0dp"
Expand Down Expand Up @@ -62,9 +62,9 @@
app:layout_constraintTop_toTopOf="parent" />


</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -166,7 +166,7 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_name" />

</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>


<TextView
Expand All @@ -182,7 +182,7 @@
android:textSize="10sp" />


</com.ticketview.mreram.sample.TicketView>
</com.mreram.ticketview.TicketView>


</FrameLayout>
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.2.21'
ext.kotlin_version = '1.3.72'

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -29,7 +29,7 @@ repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
compileKotlin {
kotlinOptions {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 01 16:57:28 IRST 2018
#Sat Jul 25 21:49:05 IST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
12 changes: 6 additions & 6 deletions ticketview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.mreram'
android {
compileSdkVersion 26
compileSdkVersion 30



defaultConfig {

minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

}

Expand All @@ -30,8 +30,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.2.21'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.72'

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.mreram.ticketview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Loading