-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zagum
committed
Jul 4, 2019
1 parent
5dbf826
commit 5bf4208
Showing
8 changed files
with
345 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.1.4' | ||
} | ||
ext.kotlin_version = '1.3.31' | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.4.1' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
} | ||
|
||
ext { | ||
compileSdkVersion = 27 | ||
buildToolsVersion = '27.0.3' | ||
minSdkVersion = 15 | ||
targetSdkVersion = compileSdkVersion | ||
compileSdkVersion = 28 | ||
buildToolsVersion = '28.0.3' | ||
minSdkVersion = 15 | ||
targetSdkVersion = compileSdkVersion | ||
|
||
supportLibVersion = '27.1.1' | ||
supportLibVersion = '1.0.2' | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
delete rootProject.buildDir | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Mar 29 16:29:46 MSK 2018 | ||
#Wed May 29 15:32:16 MSK 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-android' | ||
|
||
dependencies { | ||
implementation project(":switchicon") | ||
implementation "com.android.support:appcompat-v7:$supportLibVersion" | ||
implementation project(":switchicon") | ||
implementation "androidx.appcompat:appcompat:$supportLibVersion" | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
} | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
applicationId "com.github.zagum.switchicon.sample" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
defaultConfig { | ||
applicationId "com.github.zagum.switchicon.sample" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
vectorDrawables.useSupportLibrary = true | ||
} | ||
vectorDrawables.useSupportLibrary = true | ||
} | ||
} | ||
repositories { | ||
mavenCentral() | ||
} |
48 changes: 0 additions & 48 deletions
48
switchicon-sample/src/main/java/com/github/zagum/switchicon/sample/SampleActivity.java
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
switchicon-sample/src/main/java/com/github/zagum/switchicon/sample/SampleActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.zagum.switchicon.sample | ||
|
||
import android.app.Activity | ||
import android.os.Bundle | ||
import kotlinx.android.synthetic.main.activity_sample.* | ||
|
||
class SampleActivity : Activity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_sample) | ||
button1.setOnClickListener { switchIconView1.switchState() } | ||
button2.setOnClickListener { switchIconView2.switchState() } | ||
button3.setOnClickListener { switchIconView3.switchState() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-android' | ||
|
||
dependencies { | ||
implementation "com.android.support:appcompat-v7:$supportLibVersion" | ||
implementation "androidx.appcompat:appcompat:$supportLibVersion" | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
} | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
} | ||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
} | ||
} | ||
repositories { | ||
mavenCentral() | ||
} |
Oops, something went wrong.