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

Updated to Picasso v2.71828, gradle v4.6, sdk v27, gradle build tools v3.1.3 #389

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
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
gradleVersion = '4.6'
}

buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.2'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
classpath 'com.android.tools.build:gradle:3.1.3'
//classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
}
}

allprojects {
repositories {
mavenCentral()
google()
}
}
22 changes: 11 additions & 11 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'android-sdk-manager'
//apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'


android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
minSdkVersion 8
targetSdkVersion 22
minSdkVersion 19
targetSdkVersion 27
versionCode 2
versionName "1.0.1"
versionName "1.1.0"
}
buildTypes {
release {
Expand All @@ -20,9 +20,9 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:22.+'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.androidanimations:library:1.0.3@aar'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.androidanimations:library:1.0.3@aar'
}
8 changes: 4 additions & 4 deletions demo/src/main/java/com/daimajia/slider/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
Expand All @@ -24,15 +24,15 @@
import java.util.HashMap;


public class MainActivity extends ActionBarActivity implements BaseSliderView.OnSliderClickListener, ViewPagerEx.OnPageChangeListener{
public class MainActivity extends AppCompatActivity implements BaseSliderView.OnSliderClickListener, ViewPagerEx.OnPageChangeListener{

private SliderLayout mDemoSlider;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mDemoSlider = (SliderLayout)findViewById(R.id.slider);
mDemoSlider = findViewById(R.id.slider);

HashMap<String,String> url_maps = new HashMap<String, String>();
url_maps.put("Hannibal", "http://static2.hypable.com/wp-content/uploads/2013/12/hannibal-season-2-release-date.jpg");
Expand Down Expand Up @@ -67,7 +67,7 @@ protected void onCreate(Bundle savedInstanceState) {
mDemoSlider.setCustomAnimation(new DescriptionAnimation());
mDemoSlider.setDuration(4000);
mDemoSlider.addOnPageChangeListener(this);
ListView l = (ListView)findViewById(R.id.transformers);
ListView l = findViewById(R.id.transformers);
l.setAdapter(new TransformerAdapter(this));
l.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun May 03 23:34:25 CST 2015
#Wed Jun 20 19:50:50 EAT 2018
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-4.6-all.zip
25 changes: 15 additions & 10 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
minSdkVersion 8
targetSdkVersion 22
minSdkVersion 19
targetSdkVersion 27
versionCode 15
versionName "1.1.5"
versionName "1.2.0"
}
buildTypes {
release {
Expand All @@ -21,10 +21,15 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile "com.android.support:support-v4:22.1.1"
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:support-v4:27.1.1"
//implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.nineoldandroids:library:2.4.0'

//Added to fix conflicting versions with other libraries
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
}
apply from: './gradle-mvn-push.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

Expand All @@ -24,6 +25,7 @@ public abstract class BaseSliderView {
protected Context mContext;

private Bundle mBundle;
private String TAG = "BaseSliderView.java";

/**
* Error place holder image.
Expand Down Expand Up @@ -207,7 +209,8 @@ public void onClick(View v) {
mLoadListener.onStart(me);
}

Picasso p = (mPicasso != null) ? mPicasso : Picasso.with(mContext);
//Picasso p = (mPicasso != null) ? mPicasso : Picasso.with(mContext);
Picasso p = (mPicasso != null) ? mPicasso : Picasso.get();
RequestCreator rq = null;
if(mUrl!=null){
rq = p.load(mUrl);
Expand Down Expand Up @@ -252,14 +255,29 @@ public void onSuccess() {
}

@Override
public void onError() {
public void onError(Exception e) {

Log.e(TAG,"Picasso error: "+e);

if(mLoadListener != null){
mLoadListener.onEnd(false,me);
}
if(v.findViewById(R.id.loading_bar) != null){
v.findViewById(R.id.loading_bar).setVisibility(View.INVISIBLE);
}

}

/*
@Override
public void onError() {
if(mLoadListener != null){
mLoadListener.onEnd(false,me);
}
if(v.findViewById(R.id.loading_bar) != null){
v.findViewById(R.id.loading_bar).setVisibility(View.INVISIBLE);
}
} */
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import android.support.v4.os.ParcelableCompat;
import android.support.v4.os.ParcelableCompatCreatorCallbacks;
import android.support.v4.view.AccessibilityDelegateCompat;
import android.support.v4.view.KeyEventCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.VelocityTrackerCompat;
Expand Down Expand Up @@ -2512,17 +2511,6 @@ public boolean executeKeyEvent(KeyEvent event) {
case KeyEvent.KEYCODE_DPAD_RIGHT:
handled = arrowScroll(FOCUS_RIGHT);
break;
case KeyEvent.KEYCODE_TAB:
if (Build.VERSION.SDK_INT >= 11) {
// The focus finder had a bug handling FOCUS_FORWARD and FOCUS_BACKWARD
// before Android 3.0. Ignore the tab key on those devices.
if (KeyEventCompat.hasNoModifiers(event)) {
handled = arrowScroll(FOCUS_FORWARD);
} else if (KeyEventCompat.hasModifiers(event, KeyEvent.META_SHIFT_ON)) {
handled = arrowScroll(FOCUS_BACKWARD);
}
}
break;
}
}
return handled;
Expand Down