Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project #12

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*.iml
.gradle
/local.properties
.idea/*
/.idea/*
/.idea/workspace.xml
/.idea/libraries
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ allprojects {
Add the dependency:
```Groovy
dependencies {
compile 'com.github.yalantis:jellytoolbar:v1.0'
implementation 'com.github.yalantis:jellytoolbar:v1.0.1'
}
```

Expand Down
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.0.4'
ext.kotlin_version = '1.7.10'
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -16,7 +17,8 @@ buildscript {

allprojects {
repositories {
jcenter()
google()
mavenCentral()
}

}
Expand Down
17 changes: 9 additions & 8 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion '25.0.2'
compileSdkVersion 33
buildToolsVersion '30.0.3'

defaultConfig {
applicationId "com.yalantis.jellyanimation.demo"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
targetSdkVersion 33
versionCode 2
versionName "1.0.1"

}
signingConfigs {
Expand All @@ -30,7 +30,8 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.2.1'
compile project(':library')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':library')

implementation "androidx.appcompat:appcompat:1.5.1"
}
1 change: 1 addition & 0 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:exported="true"
android:name=".MainActivity"
android:windowSoftInputMode="stateHidden">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.yalantis.jellyanimation.demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatEditText;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatEditText;

import com.yalantis.jellytoolbar.listener.JellyListener;
import com.yalantis.jellytoolbar.widget.JellyToolbar;

Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/res/layout/edit_text.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.AppCompatEditText xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.AppCompatEditText xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorTransparent"
Expand Down
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official


RELEASE_STORE_FILE=keys/release.jks
RELEASE_KEYSTORE_PASSWORD=jellytoolbar
RELEASE_KEY_ALIAS_NAME=android
Expand Down
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
16 changes: 8 additions & 8 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 24
buildToolsVersion '25.0.2'
compileSdkVersion 33
buildToolsVersion '30.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
targetSdkVersion 33
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
Expand All @@ -23,9 +23,9 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.yalantis.jellytoolbar

import android.support.annotation.DimenRes
import android.view.View
import androidx.annotation.DimenRes

/**
* Created by irinagalata on 11/23/16.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import android.animation.Animator
*/
abstract class AnimationListener : Animator.AnimatorListener {

override fun onAnimationRepeat(animation: Animator?) = Unit
override fun onAnimationRepeat(animation: Animator) = Unit

override fun onAnimationStart(animation: Animator?) = Unit
override fun onAnimationStart(animation: Animator) = Unit

override fun onAnimationCancel(animation: Animator?) = Unit
override fun onAnimationCancel(animation: Animator) = Unit

override abstract fun onAnimationEnd(animation: Animator?)
override abstract fun onAnimationEnd(animation: Animator)

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.yalantis.jellytoolbar.widget

import android.animation.ValueAnimator
import android.content.Context
import android.support.annotation.DrawableRes
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import androidx.annotation.DrawableRes
import com.yalantis.jellytoolbar.Constant
import com.yalantis.jellytoolbar.R
import com.yalantis.jellytoolbar.getDimen
Expand All @@ -26,7 +26,8 @@ class ContentLayout : RelativeLayout, JellyWidget {
field = value
}
}
@DrawableRes var iconRes: Int? = null
@DrawableRes
var iconRes: Int? = null
set(value) {
value?.let {
icon.setBackgroundResource(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package com.yalantis.jellytoolbar.widget
import android.content.Context
import android.os.Bundle
import android.os.Parcelable
import android.support.annotation.ColorInt
import android.support.annotation.DrawableRes
import android.support.v7.widget.Toolbar
import android.text.TextUtils
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.FrameLayout
import androidx.annotation.ColorInt
import androidx.annotation.DrawableRes
import androidx.appcompat.widget.Toolbar
import com.yalantis.jellytoolbar.Constant
import com.yalantis.jellytoolbar.R
import com.yalantis.jellytoolbar.listener.JellyListener
Expand All @@ -36,7 +36,8 @@ class JellyToolbar : FrameLayout, JellyWidget {
contentLayout.contentView = value
field = value
}
@DrawableRes var iconRes: Int? = null
@DrawableRes
var iconRes: Int? = null
set(value) {
contentLayout.iconRes = value
field = value
Expand All @@ -46,7 +47,8 @@ class JellyToolbar : FrameLayout, JellyWidget {
contentLayout.cancelIconRes = value
field = value
}
@ColorInt var startColor: Int? = null
@ColorInt
var startColor: Int? = null
set(value) {
value?.let {
jellyView.startColor = value
Expand All @@ -64,9 +66,9 @@ class JellyToolbar : FrameLayout, JellyWidget {

private var isExpanded = false

constructor(context: Context?) : this(context, null)
constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0)
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
constructor(context: Context) : this(context, null)
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
LayoutInflater.from(context).inflate(R.layout.jelly_toolbar, this)

attrs?.let { retrieveAttributes(attrs) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class JellyView : View, JellyWidget {
invalidate()
}
addListener(object : AnimationListener() {
override fun onAnimationEnd(animation: Animator?) {
override fun onAnimationEnd(animation: Animator) {
difference = 0f
invalidate()

Expand Down
2 changes: 1 addition & 1 deletion library/src/main/res/layout/jelly_toolbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="80dp">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/defaultToolbar"
android:layout_width="match_parent"
android:layout_height="80dp" />
Expand Down
4 changes: 2 additions & 2 deletions library/src/main/res/layout/layout_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
android:paddingLeft="@dimen/icon_padding"
android:paddingRight="@dimen/icon_padding">

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
style="@style/Icon" />

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/cancelIcon"
style="@style/Icon"
android:layout_alignParentEnd="true"
Expand Down