diff --git a/demo/src/main/java/com/daimajia/slider/demo/MainActivity.java b/demo/src/main/java/com/daimajia/slider/demo/MainActivity.java index 8037dcf..304b864 100644 --- a/demo/src/main/java/com/daimajia/slider/demo/MainActivity.java +++ b/demo/src/main/java/com/daimajia/slider/demo/MainActivity.java @@ -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; @@ -24,7 +24,7 @@ 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; @@ -32,7 +32,7 @@ public class MainActivity extends ActionBarActivity implements BaseSliderView.On 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 url_maps = new HashMap(); url_maps.put("Hannibal", "http://static2.hypable.com/wp-content/uploads/2013/12/hannibal-season-2-release-date.jpg"); @@ -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 diff --git a/library/build.gradle b/library/build.gradle index 9716df5..0164676 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -25,6 +25,11 @@ dependencies { 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' diff --git a/library/src/main/java/com/daimajia/slider/library/Tricks/ViewPagerEx.java b/library/src/main/java/com/daimajia/slider/library/Tricks/ViewPagerEx.java index 8927d26..bbac216 100644 --- a/library/src/main/java/com/daimajia/slider/library/Tricks/ViewPagerEx.java +++ b/library/src/main/java/com/daimajia/slider/library/Tricks/ViewPagerEx.java @@ -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; @@ -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;