Skip to content
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
113 changes: 113 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 15 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion 29
defaultConfig {
applicationId "com.example.qintong.animatordemo"
minSdkVersion 16
targetSdkVersion 25
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -23,11 +24,14 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
testCompile 'junit:junit:4.12'
compile project(path: ':library')
implementation project(':library')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0-alpha04'
testImplementation 'androidx.test:runner:1.3.0-alpha02'
testImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
}
repositories {
mavenCentral()
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.example.qintong.animatordemo

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.example.qintong.animatordemo", appContext.packageName)
}
}
9 changes: 3 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.qintong.animatordemo">
package="com.example.qintong.animatordemo">

<application
android:allowBackup="true"
Expand All @@ -10,14 +10,11 @@
android:theme="@style/AppTheme">
<activity android:name=".DemoActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".TestService"
android:exported="false"
/>

</application>

Expand Down

This file was deleted.

32 changes: 32 additions & 0 deletions app/src/main/java/com/example/qintong/animatordemo/DemoActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.example.qintong.animatordemo

import android.os.Bundle
import android.widget.Toast
import android.widget.Toast.LENGTH_SHORT
import androidx.appcompat.app.AppCompatActivity
import com.qintong.library.InsLoadingView
import kotlinx.android.synthetic.main.activity_main.*

class DemoActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
/*loading_view?.setCircleDuration(2000)
loading_view?.setRotateDuration(10000)
loading_view?.setStartColor(Color.YELLOW)
loading_view?.setEndColor(Color.BLUE)*/
loading_view?.setOnClickListener {
when (loading_view?.status) {
InsLoadingView.Status.UNCLICKED -> loading_view?.status = InsLoadingView.Status.LOADING
InsLoadingView.Status.LOADING -> loading_view?.status = InsLoadingView.Status.CLICKED
InsLoadingView.Status.CLICKED -> loading_view?.status = InsLoadingView.Status.UNCLICKED
}
Toast.makeText(this@DemoActivity, "Click!", LENGTH_SHORT).show()
}
loading_view?.setOnLongClickListener {
Toast.makeText(this@DemoActivity, "Long Click!", LENGTH_SHORT).show()
true
}
}
}
Loading