Update dependency

This commit is contained in:
oupson 2019-06-11 20:46:29 +02:00
parent 6fe4225380
commit 64d31732eb
5 changed files with 8 additions and 7 deletions

View File

@ -26,11 +26,11 @@ android {
} }
dependencies { dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0' androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "org.jetbrains.anko:anko:$anko_version" implementation "org.jetbrains.anko:anko:$anko_version"

View File

@ -38,8 +38,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "org.jetbrains.anko:anko:$anko_version" implementation "org.jetbrains.anko:anko:$anko_version"
implementation 'com.squareup.picasso:picasso:2.71828' implementation 'com.squareup.picasso:picasso:2.71828'
implementation project(":apng_library") implementation project(":apng_library")

View File

@ -53,7 +53,7 @@ class CreatorActivity : AppCompatActivity() {
File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), "apn0.png").writeBytes(apngCreated.toByteArray()) File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), "apn0.png").writeBytes(apngCreated.toByteArray())
apngCreated.apply { apngCreated.apply {
optimiseFrame() //optimiseFrame()
} }
val a = ApngAnimator(applicationContext) val a = ApngAnimator(applicationContext)
File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), "apn.png").writeBytes(apngCreated.toByteArray()) File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), "apn.png").writeBytes(apngCreated.toByteArray())

View File

@ -28,6 +28,7 @@ class MainActivity : AppCompatActivity() {
private val imageUrl = "https://metagif.files.wordpress.com/2015/01/bugbuckbunny.png" private val imageUrl = "https://metagif.files.wordpress.com/2015/01/bugbuckbunny.png"
// val imageUrl = "http://orig06.deviantart.net/7812/f/2012/233/7/5/twilight_rapidash_shaded_and_animated_by_tamalesyatole-d5bz7hd.png" // val imageUrl = "http://orig06.deviantart.net/7812/f/2012/233/7/5/twilight_rapidash_shaded_and_animated_by_tamalesyatole-d5bz7hd.png"
// val imageUrl = "https://raw.githubusercontent.com/tinify/iMessage-Panda-sticker/master/StickerPackExtension/Stickers.xcstickers/Sticker%20Pack.stickerpack/panda.sticker/panda.png" // val imageUrl = "https://raw.githubusercontent.com/tinify/iMessage-Panda-sticker/master/StickerPackExtension/Stickers.xcstickers/Sticker%20Pack.stickerpack/panda.sticker/panda.png"
// val imageUrl = "file:///android_asset/image.png"
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
val buttonDrawable = GradientDrawable().apply { val buttonDrawable = GradientDrawable().apply {
@ -112,7 +113,7 @@ class MainActivity : AppCompatActivity() {
) )
val imageView = imageView { val imageView = imageView {
id = View.generateViewId() id = View.generateViewId()
animator = this.loadApng("file:///android_asset/image.png").apply { animator = this.loadApng(imageUrl).apply {
onLoaded { onLoaded {
setOnAnimationLoopListener { setOnAnimationLoopListener {
// Log.e("app-test", "onLoop") // Log.e("app-test", "onLoop")