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 #8

Open
wants to merge 3 commits into
base: master
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ reveals the avatar.

# Changelog

### Version: 1.1

* Update dependencies, migrate to AndroidX

### Version: 1.0

* Pilot version
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.android.tools.build:gradle:7.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,5 +16,6 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
# When configured, Gradle will run in incubating parallel mode.
# 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
# org.gradle.parallel=true

android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
26 changes: 13 additions & 13 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
compileSdkVersion 33
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
targetSdkVersion 33
versionCode 2
versionName "1.1"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

Expand All @@ -24,10 +24,10 @@ repositories {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.github.ozodrukh:CircularReveal:1.0.5@aar'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
compile 'com.nineoldandroids:library:2.4.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.github.ozodrukh:CircularReveal:1.1.1'
implementation 'com.squareup.picasso:picasso:2.8'
implementation 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
implementation 'com.nineoldandroids:library:2.4.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
Expand Down Expand Up @@ -157,11 +156,11 @@ private void addOverlayListItem(Map<String, Object> item, View view) {

mOverlayListItemView.findViewById(R.id.view_avatar_overlay).setBackground(sOverlayShape);

Picasso.with(EuclidActivity.this).load((Integer) item.get(EuclidListAdapter.KEY_AVATAR))
Picasso.get().load((Integer) item.get(EuclidListAdapter.KEY_AVATAR))
.resize(sScreenWidth, sProfileImageHeight).centerCrop()
.placeholder(R.color.blue)
.into((ImageView) mOverlayListItemView.findViewById(R.id.image_view_reveal_avatar));
Picasso.with(EuclidActivity.this).load((Integer) item.get(EuclidListAdapter.KEY_AVATAR))
Picasso.get().load((Integer) item.get(EuclidListAdapter.KEY_AVATAR))
.resize(sScreenWidth, sProfileImageHeight).centerCrop()
.placeholder(R.color.blue)
.into((ImageView) mOverlayListItemView.findViewById(R.id.image_view_avatar));
Expand Down Expand Up @@ -211,7 +210,7 @@ public void run() {
* @return - animator object that starts circle reveal animation.
*/
private SupportAnimator getAvatarRevealAnimator() {
final LinearLayout mWrapperListItemReveal = (LinearLayout) mOverlayListItemView.findViewById(R.id.wrapper_list_item_reveal);
final LinearLayout mWrapperListItemReveal = mOverlayListItemView.findViewById(R.id.wrapper_list_item_reveal);

int finalRadius = Math.max(mOverlayListItemView.getWidth(), mOverlayListItemView.getHeight());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
viewHolder = (ViewHolder) convertView.getTag();
}

Picasso.with(getContext()).load((Integer) mData.get(position).get(KEY_AVATAR))
Picasso.get().load((Integer) mData.get(position).get(KEY_AVATAR))
.resize(EuclidActivity.sScreenWidth, EuclidActivity.sProfileImageHeight).centerCrop()
.placeholder(R.color.blue)
.into(viewHolder.mListItemAvatar);
Expand Down
18 changes: 9 additions & 9 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
compileSdkVersion 33
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.yalantis.euclid.sample"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
targetSdkVersion 33
versionCode 2
versionName "1.1"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

Expand All @@ -25,6 +25,6 @@ repositories {
}

dependencies {
compile 'com.android.support:appcompat-v7:22.0.0'
compile project(':library')
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation project(':library')
}
3 changes: 2 additions & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down